Commit 04e4e189 authored by Anand Jain's avatar Anand Jain Committed by David Sterba

btrfs: rename err to ret in create_reloc_inode()

Unify naming of return value to the preferred way.
Signed-off-by: default avatarAnand Jain <anand.jain@oracle.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent fdee5e55
...@@ -3928,7 +3928,7 @@ static noinline_for_stack struct inode *create_reloc_inode( ...@@ -3928,7 +3928,7 @@ static noinline_for_stack struct inode *create_reloc_inode(
struct btrfs_trans_handle *trans; struct btrfs_trans_handle *trans;
struct btrfs_root *root; struct btrfs_root *root;
u64 objectid; u64 objectid;
int err = 0; int ret = 0;
root = btrfs_grab_root(fs_info->data_reloc_root); root = btrfs_grab_root(fs_info->data_reloc_root);
trans = btrfs_start_transaction(root, 6); trans = btrfs_start_transaction(root, 6);
...@@ -3937,31 +3937,31 @@ static noinline_for_stack struct inode *create_reloc_inode( ...@@ -3937,31 +3937,31 @@ static noinline_for_stack struct inode *create_reloc_inode(
return ERR_CAST(trans); return ERR_CAST(trans);
} }
err = btrfs_get_free_objectid(root, &objectid); ret = btrfs_get_free_objectid(root, &objectid);
if (err) if (ret)
goto out; goto out;
err = __insert_orphan_inode(trans, root, objectid); ret = __insert_orphan_inode(trans, root, objectid);
if (err) if (ret)
goto out; goto out;
inode = btrfs_iget(fs_info->sb, objectid, root); inode = btrfs_iget(fs_info->sb, objectid, root);
if (IS_ERR(inode)) { if (IS_ERR(inode)) {
delete_orphan_inode(trans, root, objectid); delete_orphan_inode(trans, root, objectid);
err = PTR_ERR(inode); ret = PTR_ERR(inode);
inode = NULL; inode = NULL;
goto out; goto out;
} }
BTRFS_I(inode)->index_cnt = group->start; BTRFS_I(inode)->index_cnt = group->start;
err = btrfs_orphan_add(trans, BTRFS_I(inode)); ret = btrfs_orphan_add(trans, BTRFS_I(inode));
out: out:
btrfs_put_root(root); btrfs_put_root(root);
btrfs_end_transaction(trans); btrfs_end_transaction(trans);
btrfs_btree_balance_dirty(fs_info); btrfs_btree_balance_dirty(fs_info);
if (err) { if (ret) {
iput(inode); iput(inode);
inode = ERR_PTR(err); inode = ERR_PTR(ret);
} }
return inode; return inode;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment