From: David Sterba Date: Fri, 30 May 2025 16:17:26 +0000 (+0200) Subject: btrfs: rename err to ret2 in btrfs_search_old_slot() X-Git-Tag: block-6.17-20250808~77^2~164 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=df20be9f02f0a60817531c660bcde7c7bc0883e9;p=linux-block.git 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 Signed-off-by: David Sterba --- diff --git a/fs/btrfs/ctree.c b/fs/btrfs/ctree.c index 9569e75db960..94c4ed1b99d0 100644 --- a/fs/btrfs/ctree.c +++ b/fs/btrfs/ctree.c @@ -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 @@ again: while (b) { int dec = 0; + int ret2; level = btrfs_header_level(b); p->nodes[level] = b; @@ -2305,11 +2305,11 @@ again: 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; }