From 262c96a3c3670bf2322b9a0c9d74e2a3d9e43be0 Mon Sep 17 00:00:00 2001 From: Anand Jain Date: Fri, 1 Mar 2019 12:34:50 +0800 Subject: btrfs: refactor btrfs_set_prop and add btrfs_set_prop_trans btrfs_set_prop() takes transaction pointer as the first argument, however in ioctl.c for the purpose of setting the compression property, we call btrfs_set_prop() with NULL transaction pointer. Down in the call chain btrfs_setxattr() starts transaction to update the attribute and also to update the inode. So for clarity, create btrfs_set_prop_trans() with no transaction pointer as argument, in preparation to start transaction here instead of doing it down the call chain at btrfs_setxattr(). Also now the btrfs_set_prop() is a static function. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba --- fs/btrfs/xattr.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'fs/btrfs/xattr.c') diff --git a/fs/btrfs/xattr.c b/fs/btrfs/xattr.c index 6971cbf286b5..69126d5b4d62 100644 --- a/fs/btrfs/xattr.c +++ b/fs/btrfs/xattr.c @@ -379,7 +379,7 @@ static int btrfs_xattr_handler_set_prop(const struct xattr_handler *handler, size_t size, int flags) { name = xattr_full_name(handler, name); - return btrfs_set_prop(NULL, inode, name, value, size, flags); + return btrfs_set_prop_trans(inode, name, value, size, flags); } static const struct xattr_handler btrfs_security_xattr_handler = { -- cgit v1.2.3