From cd31af158b324e5a1f03b53fb46a1e10cde238ab Mon Sep 17 00:00:00 2001 From: Anand Jain Date: Sat, 20 Apr 2019 19:48:52 +0800 Subject: btrfs: export btrfs_set_prop Make btrfs_set_prop() a non-static function, so that it can be called from btrfs_ioctl_setflags(). We need btrfs_set_prop() instead of btrfs_set_prop_trans() so that we can use the transaction which is already started in the current thread. Signed-off-by: Anand Jain Reviewed-by: David Sterba Signed-off-by: David Sterba --- fs/btrfs/props.c | 6 +++--- fs/btrfs/props.h | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/props.c b/fs/btrfs/props.c index e356dd2a0f73..aedf5a7d69c9 100644 --- a/fs/btrfs/props.c +++ b/fs/btrfs/props.c @@ -72,9 +72,9 @@ int btrfs_validate_prop(const char *name, const char *value, size_t value_len) return handler->validate(value, value_len); } -static int btrfs_set_prop(struct btrfs_trans_handle *trans, struct inode *inode, - const char *name, const char *value, size_t value_len, - int flags) +int btrfs_set_prop(struct btrfs_trans_handle *trans, struct inode *inode, + const char *name, const char *value, size_t value_len, + int flags) { const struct prop_handler *handler; int ret; diff --git a/fs/btrfs/props.h b/fs/btrfs/props.h index 01d2c1899bc7..30b99348977d 100644 --- a/fs/btrfs/props.h +++ b/fs/btrfs/props.h @@ -12,6 +12,9 @@ void __init btrfs_props_init(void); int btrfs_set_prop_trans(struct inode *inode, const char *name, const char *value, size_t value_len, int flags); +int btrfs_set_prop(struct btrfs_trans_handle *trans, struct inode *inode, + const char *name, const char *value, size_t value_len, + int flags); int btrfs_validate_prop(const char *name, const char *value, size_t value_len); int btrfs_load_inode_props(struct inode *inode, struct btrfs_path *path); -- cgit v1.2.3-58-ga151