]> git.ipfire.org Git - thirdparty/kernel/stable.git/blobdiff - fs/overlayfs/file.c
treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500
[thirdparty/kernel/stable.git] / fs / overlayfs / file.c
index 540a8b8451452f2b624121556e55066b507c353c..55ebb8f163f5f7f1749d173b6e8ce86b4c4c4a32 100644 (file)
@@ -1,9 +1,6 @@
+// SPDX-License-Identifier: GPL-2.0-only
 /*
  * Copyright (C) 2017 Red Hat, Inc.
- *
- * This program is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 as published by
- * the Free Software Foundation.
  */
 
 #include <linux/cred.h>
@@ -426,7 +423,8 @@ static unsigned int ovl_get_inode_flags(struct inode *inode)
        return ovl_iflags;
 }
 
-static long ovl_ioctl_set_flags(struct file *file, unsigned long arg)
+static long ovl_ioctl_set_flags(struct file *file, unsigned int cmd,
+                               unsigned long arg)
 {
        long ret;
        struct inode *inode = file_inode(file);
@@ -456,7 +454,7 @@ static long ovl_ioctl_set_flags(struct file *file, unsigned long arg)
        if (ret)
                goto unlock;
 
-       ret = ovl_real_ioctl(file, FS_IOC_SETFLAGS, arg);
+       ret = ovl_real_ioctl(file, cmd, arg);
 
        ovl_copyflags(ovl_inode_real(inode), inode);
 unlock:
@@ -474,11 +472,13 @@ static long ovl_ioctl(struct file *file, unsigned int cmd, unsigned long arg)
 
        switch (cmd) {
        case FS_IOC_GETFLAGS:
+       case FS_IOC_FSGETXATTR:
                ret = ovl_real_ioctl(file, cmd, arg);
                break;
 
        case FS_IOC_SETFLAGS:
-               ret = ovl_ioctl_set_flags(file, arg);
+       case FS_IOC_FSSETXATTR:
+               ret = ovl_ioctl_set_flags(file, cmd, arg);
                break;
 
        default: