]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit
btrfs: start transaction in btrfs_ioctl_setflags()
authorAnand Jain <anand.jain@oracle.com>
Sat, 20 Apr 2019 11:48:53 +0000 (19:48 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 29 Apr 2019 17:02:53 +0000 (19:02 +0200)
commitff9fef559babe4376dd698ceec3d73d0362e48a0
tree15913c623084cb9ceb1e7daf4a4dab9651752d92
parentcd31af158b324e5a1f03b53fb46a1e10cde238ab
btrfs: start transaction in btrfs_ioctl_setflags()

Inode attribute can be set through the FS_IOC_SETFLAGS ioctl.  This
flags also includes compression attribute for which we would set/reset
the compression extended attribute. While doing this there is a bit of
duplicate code, the following things happens twice:

- start/end_transaction
- inode_inc_iversion()
- current_time update to inode->i_ctime
- and btrfs_update_inode()

These are updated both at btrfs_ioctl_setflags() and btrfs_set_props()
as well.  This patch merges these two duplicate codes at
btrfs_ioctl_setflags().

Signed-off-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ioctl.c