diff options
author | Anand Jain <anand.jain@oracle.com> | 2019-04-20 19:48:56 +0800 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2019-04-29 19:02:53 +0200 |
commit | 3c8d8b635780c244aa44ad2d625e6308fbfb7ad4 (patch) | |
tree | 7b8a5e21d336a53447472bab82e02fe899520baa /fs/btrfs | |
parent | d2b8fcfe43155f23fa3e8148cdaa65345e3c45eb (diff) | |
download | linux-3c8d8b635780c244aa44ad2d625e6308fbfb7ad4.tar.gz linux-3c8d8b635780c244aa44ad2d625e6308fbfb7ad4.tar.bz2 linux-3c8d8b635780c244aa44ad2d625e6308fbfb7ad4.zip |
btrfs: drop old_fsflags in btrfs_ioctl_setflags
btrfs_inode_flags_to_fsflags() is copied into @old_fsflags and used only
once. Instead used it directly.
Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs')
-rw-r--r-- | fs/btrfs/ioctl.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c index add724e95c11..d459c37578ea 100644 --- a/fs/btrfs/ioctl.c +++ b/fs/btrfs/ioctl.c @@ -187,7 +187,7 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg) struct btrfs_inode *binode = BTRFS_I(inode); struct btrfs_root *root = binode->root; struct btrfs_trans_handle *trans; - unsigned int fsflags, old_fsflags; + unsigned int fsflags; int ret; umode_t mode; const char *comp = NULL; @@ -215,8 +215,8 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg) mode = inode->i_mode; fsflags = btrfs_mask_fsflags_for_type(inode, fsflags); - old_fsflags = btrfs_inode_flags_to_fsflags(binode->flags); - if ((fsflags ^ old_fsflags) & (FS_APPEND_FL | FS_IMMUTABLE_FL)) { + if ((fsflags ^ btrfs_inode_flags_to_fsflags(binode->flags)) & + (FS_APPEND_FL | FS_IMMUTABLE_FL)) { if (!capable(CAP_LINUX_IMMUTABLE)) { ret = -EPERM; goto out_unlock; |