]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-client.git/commitdiff
btrfs: remove pointless WARN_ON() in cache_save_setup()
authorFilipe Manana <fdmanana@suse.com>
Tue, 10 Feb 2026 14:23:29 +0000 (14:23 +0000)
committerDavid Sterba <dsterba@suse.com>
Thu, 26 Feb 2026 14:03:27 +0000 (15:03 +0100)
This WARN_ON(ret) is never executed since the previous if statement makes
us jump into the 'out_put' label when ret is not zero. The existing
transaction abort inside the if statement also gives us a stack trace,
so we don't need to move the WARN_ON(ret) into the if statement either.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/block-group.c

index 5f76683b3f2167ad859862a422057f3e0162b369..77285ade3a0e73c7da3e0d3bfff1e7e0307917c4 100644 (file)
@@ -3341,7 +3341,6 @@ again:
                btrfs_abort_transaction(trans, ret);
                goto out_put;
        }
-       WARN_ON(ret);
 
        /* We've already setup this transaction, go ahead and exit */
        if (block_group->cache_generation == trans->transid &&