提交 2d74fa3e 编写于 作者: A Anand Jain 提交者: David Sterba

btrfs: rename do_setxattr to btrfs_setxattr

When trans is not NULL btrfs_setxattr() calls do_setxattr() directly
with a check for readonly root. Rename do_setxattr() btrfs_setxattr() in
preparation to call do_setxattr() directly instead.  Preparatory patch,
no functional changes.
Signed-off-by: NAnand Jain <anand.jain@oracle.com>
Reviewed-by: NDavid Sterba <dsterba@suse.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 cac237ae
......@@ -76,9 +76,9 @@ int btrfs_getxattr(struct inode *inode, const char *name,
return ret;
}
static int do_setxattr(struct btrfs_trans_handle *trans,
struct inode *inode, const char *name,
const void *value, size_t size, int flags)
static 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;
......@@ -231,13 +231,13 @@ int btrfs_setxattr_trans(struct btrfs_trans_handle *trans,
return -EROFS;
if (trans)
return do_setxattr(trans, inode, name, value, size, flags);
return btrfs_setxattr(trans, inode, name, value, size, flags);
trans = btrfs_start_transaction(root, 2);
if (IS_ERR(trans))
return PTR_ERR(trans);
ret = do_setxattr(trans, inode, name, value, size, flags);
ret = btrfs_setxattr(trans, inode, name, value, size, flags);
if (ret)
goto out;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册