[04/10] btrfs: drop useless inode i_flags copy and restore
diff mbox series

Message ID 20190420114900.15472-5-anand.jain@oracle.com
State New
Headers show
Series
  • Untitled series #108271
Related show

Commit Message

Anand Jain April 20, 2019, 11:48 a.m. UTC
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: Anand Jain <anand.jain@oracle.com>
---
 fs/btrfs/ioctl.c | 3 ---
 1 file changed, 3 deletions(-)

Patch
diff mbox series

diff --git a/fs/btrfs/ioctl.c b/fs/btrfs/ioctl.c
index fc3f75c9a210..1834b576d1cb 100644
--- a/fs/btrfs/ioctl.c
+++ b/fs/btrfs/ioctl.c
@@ -190,7 +190,6 @@  static int btrfs_ioctl_setflags(struct file *file, void __user *arg)
 	unsigned int fsflags, old_fsflags;
 	int ret;
 	u64 old_flags;
-	unsigned int old_i_flags;
 	umode_t mode;
 	const char *comp = NULL;
 
@@ -214,7 +213,6 @@  static int btrfs_ioctl_setflags(struct file *file, void __user *arg)
 	inode_lock(inode);
 
 	old_flags = binode->flags;
-	old_i_flags = inode->i_flags;
 	mode = inode->i_mode;
 
 	fsflags = btrfs_mask_fsflags_for_type(inode, fsflags);
@@ -335,7 +333,6 @@  static int btrfs_ioctl_setflags(struct file *file, void __user *arg)
  out_drop:
 	if (ret) {
 		binode->flags = old_flags;
-		inode->i_flags = old_i_flags;
 	}
 
  out_unlock: