btrfs: rename err to ret2 in btrfs_search_old_slot()

Unify naming of return value to the preferred way, move the variable to
the closest scope.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
David Sterba
2025-05-30 18:17:26 +02:00
parent 644dcb4316
commit df20be9f02

View File

@@ -2245,7 +2245,6 @@ int btrfs_search_old_slot(struct btrfs_root *root, const struct btrfs_key *key,
struct extent_buffer *b;
int slot;
int ret;
int err;
int level;
int lowest_unlock = 1;
u8 lowest_level = 0;
@@ -2270,6 +2269,7 @@ int btrfs_search_old_slot(struct btrfs_root *root, const struct btrfs_key *key,
while (b) {
int dec = 0;
int ret2;
level = btrfs_header_level(b);
p->nodes[level] = b;
@@ -2305,11 +2305,11 @@ int btrfs_search_old_slot(struct btrfs_root *root, const struct btrfs_key *key,
goto done;
}
err = read_block_for_search(root, p, &b, slot, key);
if (err == -EAGAIN && !p->nowait)
ret2 = read_block_for_search(root, p, &b, slot, key);
if (ret2 == -EAGAIN && !p->nowait)
goto again;
if (err) {
ret = err;
if (ret2) {
ret = ret2;
goto done;
}