]> git.hungrycats.org Git - linux/commit
btrfs: scrub: allocate stripe buffer with GFP_KERNEL
authorFilipe Manana <fdmanana@suse.com>
Fri, 16 Oct 2026 11:55:55 +0000 (12:55 +0100)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Oct 2026 15:08:19 +0000 (17:08 +0200)
commitc9cea9a5632663a0371e4a85e490fda7ebf9abe8
tree8c75ff81cbdc89625f11d6431d7e829c752f7af6
parentd365a6d6777e8f2854dd883858438100d802f563
btrfs: scrub: allocate stripe buffer with GFP_KERNEL

In init_scrub_stripe() we are allocating a stripe's buffer with GFP_NOFS
but we can use GFP_KERNEL instead since we are not holding a transaction
handle or any locks that could cause a deadlock if GFP_KERNEL triggers a
transaction commit.

So switch to GFP_KERNEL. We are also doing GFP_KERNEL for the allocation
of stripe->csums just a few lines below.

Reviewed-by: Qu Wenruo <wqu@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/scrub.c