Commit 11d3cd5c authored by Anand Jain's avatar Anand Jain Committed by David Sterba

btrfs: drop useless inode i_flags copy and restore

The patch ("btrfs: start transaction in btrfs_ioctl_setflags()") used
btrfs_set_prop() instead of btrfs_set_prop_trans() by which now the
inode::i_flags update functions such as
btrfs_sync_inode_flags_to_i_flags() and btrfs_update_inode() is called
in btrfs_ioctl_setflags() instead of
btrfs_set_prop_trans()->btrfs_setxattr() as earlier. So the
inode::i_flags remains unmodified until the thread has checked all the
conditions. So drop the saved inode::i_flags in out_i_flags.
Signed-off-by: default avatarAnand Jain <anand.jain@oracle.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent ff9fef55
...@@ -190,7 +190,6 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg) ...@@ -190,7 +190,6 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg)
unsigned int fsflags, old_fsflags; unsigned int fsflags, old_fsflags;
int ret; int ret;
u64 old_flags; u64 old_flags;
unsigned int old_i_flags;
umode_t mode; umode_t mode;
const char *comp = NULL; const char *comp = NULL;
...@@ -214,7 +213,6 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg) ...@@ -214,7 +213,6 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg)
inode_lock(inode); inode_lock(inode);
old_flags = binode->flags; old_flags = binode->flags;
old_i_flags = inode->i_flags;
mode = inode->i_mode; mode = inode->i_mode;
fsflags = btrfs_mask_fsflags_for_type(inode, fsflags); fsflags = btrfs_mask_fsflags_for_type(inode, fsflags);
...@@ -339,7 +337,6 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg) ...@@ -339,7 +337,6 @@ static int btrfs_ioctl_setflags(struct file *file, void __user *arg)
out_drop: out_drop:
if (ret) { if (ret) {
binode->flags = old_flags; binode->flags = old_flags;
inode->i_flags = old_i_flags;
} }
out_unlock: out_unlock:
......
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