Skip to content
  • Anand Jain's avatar
    btrfs: start transaction in btrfs_ioctl_setflags() · ff9fef55
    Anand Jain authored
    
    
    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: default avatarAnand Jain <anand.jain@oracle.com>
    Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
    Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
    ff9fef55