summaryrefslogtreecommitdiff
path: root/fs/btrfs/block-group.c
diff options
context:
space:
mode:
authorDavid Sterba <dsterba@suse.com>2023-05-25 02:04:34 +0300
committerDavid Sterba <dsterba@suse.com>2023-06-19 14:59:30 +0300
commit7dde7a8ab32417f28c4ac0111f8a8389fc0501ff (patch)
tree393611dac520ac6d40f0a4be225abc8b436faf62 /fs/btrfs/block-group.c
parent0acd32c294cf51e22ecf31a5b9065047568e5d0d (diff)
downloadlinux-7dde7a8ab32417f28c4ac0111f8a8389fc0501ff.tar.xz
btrfs: drop NOFAIL from set_extent_bit allocation masks
The __GFP_NOFAIL passed to set_extent_bit first appeared in 2010 (commit f0486c68e4bd9a ("Btrfs: Introduce contexts for metadata reservation")), without any explanation why it would be needed. Meanwhile we've updated the semantics of set_extent_bit to handle failed allocations and do unlock, sleep and retry if needed. The use of the NOFAIL flag is also an outlier, we never want any of the set/clear extent bit helpers to fail, they're used for many critical changes like extent locking, besides the extent state bit changes. Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/block-group.c')
-rw-r--r--fs/btrfs/block-group.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/btrfs/block-group.c b/fs/btrfs/block-group.c
index ec463f8d83ec..202e2aa949c5 100644
--- a/fs/btrfs/block-group.c
+++ b/fs/btrfs/block-group.c
@@ -3523,8 +3523,7 @@ int btrfs_update_block_group(struct btrfs_trans_handle *trans,
set_extent_bit(&trans->transaction->pinned_extents,
bytenr, bytenr + num_bytes - 1,
- EXTENT_DIRTY, NULL,
- GFP_NOFS | __GFP_NOFAIL);
+ EXTENT_DIRTY, NULL, GFP_NOFS);
}
spin_lock(&trans->transaction->dirty_bgs_lock);