btrfs: rename err to ret2 in read_block_for_search()
authorDavid Sterba <dsterba@suse.com>
Fri, 30 May 2025 16:17:11 +0000 (18:17 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 21 Jul 2025 21:53:27 +0000 (23:53 +0200)
Unify naming of return value to the preferred way.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/ctree.c

index a27578c513a0e9baec60ff4e4d5aba527b627d61..d32d2d02d4734b201f19bbeebf5013400321bfca 100644 (file)
@@ -1457,8 +1457,8 @@ read_block_for_search(struct btrfs_root *root, struct btrfs_path *p,
        u64 blocknr;
        struct extent_buffer *tmp = NULL;
        int ret = 0;
+       int ret2;
        int parent_level;
-       int err;
        bool read_tmp = false;
        bool tmp_locked = false;
        bool path_released = false;
@@ -1516,9 +1516,9 @@ read_block_for_search(struct btrfs_root *root, struct btrfs_path *p,
                }
 
                /* Now we're allowed to do a blocking uptodate check. */
-               err = btrfs_read_extent_buffer(tmp, &check);
-               if (err) {
-                       ret = err;
+               ret2 = btrfs_read_extent_buffer(tmp, &check);
+               if (ret2) {
+                       ret = ret2;
                        goto out;
                }
 
@@ -1559,9 +1559,9 @@ read_block_for_search(struct btrfs_root *root, struct btrfs_path *p,
        }
 
        /* Now we're allowed to do a blocking uptodate check. */
-       err = btrfs_read_extent_buffer(tmp, &check);
-       if (err) {
-               ret = err;
+       ret2 = btrfs_read_extent_buffer(tmp, &check);
+       if (ret2) {
+               ret = ret2;
                goto out;
        }