OSDN Git Service

btrfs: prop: open code btrfs_set_prop in inherit_prop
authorAnand Jain <anand.jain@oracle.com>
Tue, 2 Apr 2019 10:07:41 +0000 (18:07 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 29 Apr 2019 17:02:35 +0000 (19:02 +0200)
commit8b4d1efc9e6c326fe73a88d562c9d1c571493d32
tree8c4b4e1e0d8d2f094f31c497d6ca333034c91cca
parentae0bc863106ae45b189986c76fda44f6885e8769
btrfs: prop: open code btrfs_set_prop in inherit_prop

When an inode inherits property from its parent, we call btrfs_set_prop().
btrfs_set_prop() does an elaborate checks, which is not required in the
context of inheriting a property. Instead just open-code only the required
items from btrfs_set_prop() and then call btrfs_setxattr() directly. So
now the only user of btrfs_set_prop() is gone, (except for the wraper
function btrfs_set_prop_trans()).

Reviewed-by: Nikolay Borisov <nborisov@suse.com>
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/props.c