All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Sterba <dsterba@suse.com>
To: linux-btrfs@vger.kernel.org
Cc: David Sterba <dsterba@suse.com>
Subject: [PATCH 3/4] btrfs: switch GFP_NOFS to GFP_KERNEL in scrub_setup_recheck_block
Date: Tue, 18 Oct 2022 16:27:35 +0200	[thread overview]
Message-ID: <aed6063361919c409c72b208d361be0a5d094b3a.1666103172.git.dsterba@suse.com> (raw)
In-Reply-To: <cover.1666103172.git.dsterba@suse.com>

There's only one caller that calls scrub_setup_recheck_block in the
memalloc_nofs_save/_restore protection so it's effectively already
GFP_NOFS and it's safe to use GFP_KERNEL.

Signed-off-by: David Sterba <dsterba@suse.com>
---
 fs/btrfs/scrub.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/btrfs/scrub.c b/fs/btrfs/scrub.c
index 9e3b2e60e571..2fc70a2cc7fe 100644
--- a/fs/btrfs/scrub.c
+++ b/fs/btrfs/scrub.c
@@ -1491,7 +1491,7 @@ static int scrub_setup_recheck_block(struct scrub_block *original_sblock,
 			return -EIO;
 		}
 
-		recover = kzalloc(sizeof(struct scrub_recover), GFP_NOFS);
+		recover = kzalloc(sizeof(struct scrub_recover), GFP_KERNEL);
 		if (!recover) {
 			btrfs_put_bioc(bioc);
 			btrfs_bio_counter_dec(fs_info);
@@ -1514,7 +1514,7 @@ static int scrub_setup_recheck_block(struct scrub_block *original_sblock,
 			sblock = sblocks_for_recheck[mirror_index];
 			sblock->sctx = sctx;
 
-			sector = alloc_scrub_sector(sblock, logical, GFP_NOFS);
+			sector = alloc_scrub_sector(sblock, logical, GFP_KERNEL);
 			if (!sector) {
 				spin_lock(&sctx->stat_lock);
 				sctx->stat.malloc_errors++;
-- 
2.37.3


  parent reply	other threads:[~2022-10-18 14:27 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-18 14:27 [PATCH 0/4] Parameter cleanup David Sterba
2022-10-18 14:27 ` [PATCH 1/4] btrfs: sink gfp_t parameter to btrfs_backref_iter_alloc David Sterba
2022-10-20  5:56   ` Anand Jain
2022-10-18 14:27 ` [PATCH 2/4] btrfs: sink gfp_t parameter to btrfs_qgroup_trace_extent David Sterba
2022-10-20  6:01   ` Anand Jain
2022-10-20 16:39     ` David Sterba
2022-10-18 14:27 ` David Sterba [this message]
2022-10-20  7:27   ` [PATCH 3/4] btrfs: switch GFP_NOFS to GFP_KERNEL in scrub_setup_recheck_block Anand Jain
2022-10-20 16:35     ` David Sterba
2022-10-21  2:34       ` Anand Jain
2022-10-18 14:27 ` [PATCH 4/4] btrfs: sink gfp_t parameter to alloc_scrub_sector David Sterba
2022-10-20  7:30   ` Anand Jain
2022-10-19 10:28 ` [PATCH 0/4] Parameter cleanup Johannes Thumshirn
2022-10-19 15:16   ` David Sterba
2022-10-19 15:23     ` Johannes Thumshirn
2022-10-19 16:05       ` David Sterba

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=aed6063361919c409c72b208d361be0a5d094b3a.1666103172.git.dsterba@suse.com \
    --to=dsterba@suse.com \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.