]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/commitdiff
btrfs: export btrfs_setxattr
authorAnand Jain <anand.jain@oracle.com>
Fri, 12 Apr 2019 08:02:56 +0000 (16:02 +0800)
committerDavid Sterba <dsterba@suse.com>
Mon, 29 Apr 2019 17:02:44 +0000 (19:02 +0200)
Preparatory patch, as we are going split the calls with and without
transaction to use the respective btrfs_setxattr() and
btrfs_setxattr_trans() functions. Export btrfs_setxattr() for calls
outside of xattr.c.

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/xattr.c
fs/btrfs/xattr.h

index fd1469ef55d6c8326c1f35bf17b6e70219ff9af0..b2b68676ec5270fee4db090f93000520556185e0 100644 (file)
@@ -76,9 +76,8 @@ out:
        return ret;
 }
 
-static int btrfs_setxattr(struct btrfs_trans_handle *trans,
-                         struct inode *inode, const char *name,
-                         const void *value, size_t size, int flags)
+int btrfs_setxattr(struct btrfs_trans_handle *trans, struct inode *inode,
+                  const char *name, const void *value, size_t size, int flags)
 {
        struct btrfs_dir_item *di = NULL;
        struct btrfs_root *root = BTRFS_I(inode)->root;
index 36d54a15cbfee809d3abcb1d60cf45c8324132fd..a95834cc3c0445e2f0925f28292bec5ff8bcc16f 100644 (file)
@@ -12,6 +12,8 @@ extern const struct xattr_handler *btrfs_xattr_handlers[];
 
 int btrfs_getxattr(struct inode *inode, const char *name,
                void *buffer, size_t size);
+int btrfs_setxattr(struct btrfs_trans_handle *trans, struct inode *inode,
+                  const char *name, const void *value, size_t size, int flags);
 int btrfs_setxattr_trans(struct btrfs_trans_handle *trans,
                            struct inode *inode, const char *name,
                            const void *value, size_t size, int flags);