All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kara <jack@suse.cz>
To: <linux-fsdevel@vger.kernel.org>
Cc: <linux-ext4@vger.kernel.org>,
	Matthew Wilcox <willy@infradead.org>, Jan Kara <jack@suse.cz>
Subject: [PATCH 1/9] udf: Remove GFP_NOFS from dir iteration code
Date: Tue, 23 Jan 2024 16:25:00 +0100	[thread overview]
Message-ID: <20240123152520.4294-1-jack@suse.cz> (raw)
In-Reply-To: <20240123152113.13352-1-jack@suse.cz>

Directory iteration code was using GFP_NOFS allocations in two places.
However the code is called only under inode->i_rwsem which is generally
safe wrt reclaim. So we can do the allocations with GFP_KERNEL instead.

Signed-off-by: Jan Kara <jack@suse.cz>
---
 fs/udf/dir.c   | 2 +-
 fs/udf/namei.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/udf/dir.c b/fs/udf/dir.c
index f6533f93851b..f94f45fe2c91 100644
--- a/fs/udf/dir.c
+++ b/fs/udf/dir.c
@@ -67,7 +67,7 @@ static int udf_readdir(struct file *file, struct dir_context *ctx)
 		pos_valid = true;
 	}
 
-	fname = kmalloc(UDF_NAME_LEN, GFP_NOFS);
+	fname = kmalloc(UDF_NAME_LEN, GFP_KERNEL);
 	if (!fname) {
 		ret = -ENOMEM;
 		goto out;
diff --git a/fs/udf/namei.c b/fs/udf/namei.c
index 1bb6ed948927..1f14a0621a91 100644
--- a/fs/udf/namei.c
+++ b/fs/udf/namei.c
@@ -59,7 +59,7 @@ static int udf_fiiter_find_entry(struct inode *dir, const struct qstr *child,
 		child->name[0] == '.' && child->name[1] == '.';
 	int ret;
 
-	fname = kmalloc(UDF_NAME_LEN, GFP_NOFS);
+	fname = kmalloc(UDF_NAME_LEN, GFP_KERNEL);
 	if (!fname)
 		return -ENOMEM;
 
-- 
2.35.3


  reply	other threads:[~2024-01-23 15:25 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-23 15:24 [PATCH 0/9] Remove GFP_NOFS uses from ext2, udf, and quota code Jan Kara
2024-01-23 15:25 ` Jan Kara [this message]
2024-01-23 15:25 ` [PATCH 2/9] udf: Avoid GFP_NOFS allocation in udf_symlink() Jan Kara
2024-01-23 15:25 ` [PATCH 3/9] udf: Avoid GFP_NOFS allocation in udf_load_pvoldesc() Jan Kara
2024-01-23 15:25 ` [PATCH 4/9] udf: Remove GFP_NOFS allocation in udf_expand_file_adinicb() Jan Kara
2024-01-23 15:25 ` [PATCH 5/9] ext2: Drop GFP_NOFS allocation from ext2_init_block_alloc_info() Jan Kara
2024-01-23 15:25 ` [PATCH 6/9] ext2: Drop GFP_NOFS use in ext2_get_blocks() Jan Kara
2024-01-23 15:25 ` [PATCH 7/9] ext2: Remove GFP_NOFS use in ext2_xattr_cache_insert() Jan Kara
2024-01-23 15:25 ` [PATCH 8/9] quota: Set nofs allocation context when acquiring dqio_sem Jan Kara
2024-01-23 15:25 ` [PATCH 9/9] quota: Drop GFP_NOFS instances under dquot->dq_lock and dqio_sem Jan Kara

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=20240123152520.4294-1-jack@suse.cz \
    --to=jack@suse.cz \
    --cc=linux-ext4@vger.kernel.org \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=willy@infradead.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.