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>
atomic_set(&stripe->pending_io, 0);
spin_lock_init(&stripe->write_error_lock);
- stripe->buffer = kvmalloc(BTRFS_STRIPE_LEN, GFP_NOFS);
+ stripe->buffer = kvmalloc(BTRFS_STRIPE_LEN, GFP_KERNEL);
if (!stripe->buffer)
goto error;