]> 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>
Fri, 30 Oct 2026 20:36:17 +0000 (21:36 +0100)
commit83ee961f807d804b7032ce129f9c27ea1445fcb4
treed1bba72be0570c46c33afffcb0962f99a12c655e
parent4e84836b6951926a4a2b7c40307a05c07065e69f
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