Commit 5ba76abf authored by David Sterba's avatar David Sterba

btrfs: rename check_flags to reflect which flags it touches

The FS_*_FL flags cannot be easily identified by a prefix but we still
need to recognize them so the 'fsflags' should be closer to the naming
scheme but again the 'fs' part sounds like it's a filesystem flag. I
don't have a better idea for now.
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 1905a0f7
...@@ -168,7 +168,8 @@ static int btrfs_ioctl_getflags(struct file *file, void __user *arg) ...@@ -168,7 +168,8 @@ static int btrfs_ioctl_getflags(struct file *file, void __user *arg)
return 0; return 0;
} }
static int check_flags(unsigned int flags) /* Check if @flags are a supported and valid set of FS_*_FL flags */
static int check_fsflags(unsigned int flags)
{ {
if (flags & ~(FS_IMMUTABLE_FL | FS_APPEND_FL | \ if (flags & ~(FS_IMMUTABLE_FL | FS_APPEND_FL | \
FS_NOATIME_FL | FS_NODUMP_FL | \ FS_NOATIME_FL | FS_NODUMP_FL | \
...@@ -205,7 +206,7 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg) ...@@ -205,7 +206,7 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg)
if (copy_from_user(&flags, arg, sizeof(flags))) if (copy_from_user(&flags, arg, sizeof(flags)))
return -EFAULT; return -EFAULT;
ret = check_flags(flags); ret = check_fsflags(flags);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment