btrfs: fix unlikely in btrfs_insert_one_raid_extent()
PATCH 1/1 btrfs: fix unlikely in btrfs_insert_one_raid_extent()
Fix the unlikely added to btrfs_insert_one_raid_extent() by commita929904c: the exclamation point is in the wrong place, so we are telling the compiler that allocation failure is actually expected.
--- fs/btrfs/raid-stripe-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/raid-stripe-tree.c +1 -1
@@ -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 ;
Signature · 1 line
2.52.0
Quoted 7 lines · Mark Harmstone
Fix the unlikely added to
btrfs_insert_one_raid_extent()by commita929904c: the exclamation point is in the wrong place, so we are telling the compiler that allocation failure is actually expected.Signed-off-by Mark Harmstone <[email protected]>Fixes a929904cf73b ("btrfs: add unlikely annotations to branches leading to transaction abort")
We use the Fixes tag for things that must be backported, which are aither bug fixes or rather severe performance regressions (i.e. things that affect users), and this doesn't fit into these categories.
Otherwise:
Quoted 21 lines
--- fs/btrfs/raid-stripe-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/btrfs/raid-stripe-tree.c +1
-2@@ -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 ; --2.52.0
Quoted 6 lines · Filipe Manana
Quoted 5 lines · Mark Harmstone
Fix the unlikely added to
btrfs_insert_one_raid_extent()by commita929904c: the exclamation point is in the wrong place, so we are telling the compiler that allocation failure is actually expected.
Quoted 6 lines
Quoted 2 lines
Signed-off-by Mark Harmstone <[email protected]>Fixes a929904cf73b ("btrfs: add unlikely annotations to branches leading to transaction abort")We use the Fixes tag for things that must be backported, which are aither bug fixes or rather severe performance regressions (i.e. things that affect users), and this doesn't fit into these categories.
Okay - thanks Filipe, I'll push it with the Fixes line taken out.
Quoted 26 lines
Otherwise:
Reviewed-by Filipe Manana <[email protected]>Quoted 21 lines
--- fs/btrfs/raid-stripe-tree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)fs/btrfs/raid-stripe-tree.c +1
-2@@ -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 ; --2.52.0