mirror of
https://gitee.com/bianbu-linux/linux-6.6
synced 2025-04-24 14:07:52 -04:00
btrfs: split btrfs_setxattr calls regarding transaction
When the caller has already created the transaction handle, btrfs_setxattr() will use it. Also adds assert in btrfs_setxattr(). Signed-off-by: Anand Jain <anand.jain@oracle.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
353c2ea735
commit
04e6863b19
3 changed files with 33 additions and 13 deletions
|
@ -93,7 +93,11 @@ static int __btrfs_set_acl(struct btrfs_trans_handle *trans,
|
|||
goto out;
|
||||
}
|
||||
|
||||
ret = btrfs_setxattr_trans(trans, inode, name, value, size, 0);
|
||||
if (trans)
|
||||
ret = btrfs_setxattr(trans, inode, name, value, size, 0);
|
||||
else
|
||||
ret = btrfs_setxattr_trans(NULL, inode, name, value, size, 0);
|
||||
|
||||
out:
|
||||
kfree(value);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue