Commit 2daca1e4 authored by Anand Jain's avatar Anand Jain Committed by David Sterba

btrfs: rename err and ret to ret in build_backref_tree()

Code style fix in the function build_backref_tree().  Drop the ret
initialization 0, as we don't need it.
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 1e8a4237
...@@ -473,20 +473,19 @@ static noinline_for_stack struct btrfs_backref_node *build_backref_tree( ...@@ -473,20 +473,19 @@ static noinline_for_stack struct btrfs_backref_node *build_backref_tree(
struct btrfs_backref_node *node = NULL; struct btrfs_backref_node *node = NULL;
struct btrfs_backref_edge *edge; struct btrfs_backref_edge *edge;
int ret; int ret;
int err = 0;
iter = btrfs_backref_iter_alloc(rc->extent_root->fs_info); iter = btrfs_backref_iter_alloc(rc->extent_root->fs_info);
if (!iter) if (!iter)
return ERR_PTR(-ENOMEM); return ERR_PTR(-ENOMEM);
path = btrfs_alloc_path(); path = btrfs_alloc_path();
if (!path) { if (!path) {
err = -ENOMEM; ret = -ENOMEM;
goto out; goto out;
} }
node = btrfs_backref_alloc_node(cache, bytenr, level); node = btrfs_backref_alloc_node(cache, bytenr, level);
if (!node) { if (!node) {
err = -ENOMEM; ret = -ENOMEM;
goto out; goto out;
} }
...@@ -497,10 +496,9 @@ static noinline_for_stack struct btrfs_backref_node *build_backref_tree( ...@@ -497,10 +496,9 @@ static noinline_for_stack struct btrfs_backref_node *build_backref_tree(
do { do {
ret = btrfs_backref_add_tree_node(trans, cache, path, iter, ret = btrfs_backref_add_tree_node(trans, cache, path, iter,
node_key, cur); node_key, cur);
if (ret < 0) { if (ret < 0)
err = ret;
goto out; goto out;
}
edge = list_first_entry_or_null(&cache->pending_edge, edge = list_first_entry_or_null(&cache->pending_edge,
struct btrfs_backref_edge, list[UPPER]); struct btrfs_backref_edge, list[UPPER]);
/* /*
...@@ -515,10 +513,8 @@ static noinline_for_stack struct btrfs_backref_node *build_backref_tree( ...@@ -515,10 +513,8 @@ static noinline_for_stack struct btrfs_backref_node *build_backref_tree(
/* Finish the upper linkage of newly added edges/nodes */ /* Finish the upper linkage of newly added edges/nodes */
ret = btrfs_backref_finish_upper_links(cache, node); ret = btrfs_backref_finish_upper_links(cache, node);
if (ret < 0) { if (ret < 0)
err = ret;
goto out; goto out;
}
if (handle_useless_nodes(rc, node)) if (handle_useless_nodes(rc, node))
node = NULL; node = NULL;
...@@ -526,9 +522,9 @@ static noinline_for_stack struct btrfs_backref_node *build_backref_tree( ...@@ -526,9 +522,9 @@ static noinline_for_stack struct btrfs_backref_node *build_backref_tree(
btrfs_free_path(iter->path); btrfs_free_path(iter->path);
kfree(iter); kfree(iter);
btrfs_free_path(path); btrfs_free_path(path);
if (err) { if (ret) {
btrfs_backref_error_cleanup(cache, node); btrfs_backref_error_cleanup(cache, node);
return ERR_PTR(err); return ERR_PTR(ret);
} }
ASSERT(!node || !node->detached); ASSERT(!node || !node->detached);
ASSERT(list_empty(&cache->useless_node) && ASSERT(list_empty(&cache->useless_node) &&
......
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