Skip to content

Commit 8ac7fad

Browse files
fdmananakdave
authored andcommitted
btrfs: remove pointless WARN_ON() in cache_save_setup()
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>
1 parent 912db40 commit 8ac7fad

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

fs/btrfs/block-group.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3341,7 +3341,6 @@ static int cache_save_setup(struct btrfs_block_group *block_group,
33413341
btrfs_abort_transaction(trans, ret);
33423342
goto out_put;
33433343
}
3344-
WARN_ON(ret);
33453344

33463345
/* We've already setup this transaction, go ahead and exit */
33473346
if (block_group->cache_generation == trans->transid &&

0 commit comments

Comments
 (0)