[PATCH 14/29] btrfs: build_backref_tree rename err to ret and ret to ret2

Anand Jain
2024-03-19T14:57:44Z

Code sytle fix in the function build_backref_tree().

Signed-off-by: Anand Jain <anand.jain@oracle.com>
---
fs/btrfs/relocation.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/fs/btrfs/relocation.c b/fs/btrfs/relocation.c
index f96f267fb4aa..535d5657777b 100644
--- a/fs/btrfs/relocation.c
+++ b/fs/btrfs/relocation.c
@@ -472,21 +472,21 @@ static noinline_for_stack struct btrfs_backref_node *build_backref_tree(
struct btrfs_backref_node *cur;
struct btrfs_backref_node *node = NULL;
struct btrfs_backref_edge *edge;
- int ret;
- int err = 0;
+ int ret = 0;
+ int ret2;

iter = btrfs_backref_iter_alloc(rc->extent_root->fs_info);
if (!iter)
return ERR_PTR(-ENOMEM);
path = btrfs_alloc_path();
if (!path) {
- err = -ENOMEM;
+ ret = -ENOMEM;
goto out;
}

node = btrfs_backref_alloc_node(cache, bytenr, level);
if (!node) {
- err = -ENOMEM;
+ ret = -ENOMEM;
goto out;
}

@@ -495,10 +495,10 @@ static noinline_for_stack struct btrfs_backref_node *build_backref_tree(

/* Breadth-first search to build backref cache */
do {
- ret = btrfs_backref_add_tree_node(trans, cache, path, iter,
+ ret2 = btrfs_backref_add_tree_node(trans, cache, path, iter,
node_key, cur);
- if (ret < 0) {
- err = ret;
+ if (ret2 < 0) {
+ ret = ret2;
goto out;
}
edge = list_first_entry_or_null(&cache->pending_edge,
@@ -514,9 +514,9 @@ static noinline_for_stack struct btrfs_backref_node *build_backref_tree(
} while (edge);

/* Finish the upper linkage of newly added edges/nodes */
- ret = btrfs_backref_finish_upper_links(cache, node);
- if (ret < 0) {
- err = ret;
+ ret2 = btrfs_backref_finish_upper_links(cache, node);
+ if (ret2 < 0) {
+ ret = ret2;
goto out;
}

@@ -526,9 +526,9 @@ static noinline_for_stack struct btrfs_backref_node *build_backref_tree(
btrfs_free_path(iter->path);
kfree(iter);
btrfs_free_path(path);
- if (err) {
+ if (ret) {
btrfs_backref_error_cleanup(cache, node);
- return ERR_PTR(err);
+ return ERR_PTR(ret);
}
ASSERT(!node || !node->detached);
ASSERT(list_empty(&cache->useless_node) &&
--
2.38.1