mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-05-16 04:21:09 -04:00
btrfs: fix placement of unlikely() in btrfs_insert_one_raid_extent()
Fix the unlikely added to btrfs_insert_one_raid_extent() by commit
a929904cf7 ("btrfs: add unlikely annotations to branches leading to
transaction abort"): the exclamation point is in the wrong place, so we
are telling the compiler that allocation failure is actually expected.
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Mark Harmstone <mark@harmstone.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
committed by
David Sterba
parent
2c4648a39b
commit
b6193a8916
@@ -300,7 +300,7 @@ int btrfs_insert_one_raid_extent(struct btrfs_trans_handle *trans,
|
||||
int ret;
|
||||
|
||||
stripe_extent = kzalloc(item_size, GFP_NOFS);
|
||||
if (!unlikely(stripe_extent)) {
|
||||
if (unlikely(!stripe_extent)) {
|
||||
btrfs_abort_transaction(trans, -ENOMEM);
|
||||
btrfs_end_transaction(trans);
|
||||
return -ENOMEM;
|
||||
|
||||
Reference in New Issue
Block a user