public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 1/3] f2fs: use memalloc_retry_wait() as much as possible
@ 2025-11-12  1:47 Chao Yu
  2025-11-12  1:47 ` [PATCH v2 2/3] f2fs: introduce f2fs_schedule_timeout() Chao Yu
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Chao Yu @ 2025-11-12  1:47 UTC (permalink / raw)
  To: jaegeuk; +Cc: linux-f2fs-devel, linux-kernel, Chao Yu

memalloc_retry_wait() is recommended in memory allocation retry logic,
use it as much as possible.

Signed-off-by: Chao Yu <chao@kernel.org>
---
use memalloc_retry_wait() instead of f2fs_io_schedule_timeout()
 fs/f2fs/segment.c | 2 +-
 fs/f2fs/super.c   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 10d873d1b328..d968a4250b1a 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -234,7 +234,7 @@ static int __replace_atomic_write_block(struct inode *inode, pgoff_t index,
 	err = f2fs_get_dnode_of_data(&dn, index, ALLOC_NODE);
 	if (err) {
 		if (err == -ENOMEM) {
-			f2fs_io_schedule_timeout(DEFAULT_IO_TIMEOUT);
+			memalloc_retry_wait(GFP_NOFS);
 			goto retry;
 		}
 		return err;
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index c2161b3469b3..2bd7c2320d4f 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -3139,7 +3139,7 @@ static ssize_t f2fs_quota_write(struct super_block *sb, int type,
 							&folio, &fsdata);
 		if (unlikely(err)) {
 			if (err == -ENOMEM) {
-				f2fs_io_schedule_timeout(DEFAULT_IO_TIMEOUT);
+				memalloc_retry_wait(GFP_NOFS);
 				goto retry;
 			}
 			set_sbi_flag(F2FS_SB(sb), SBI_QUOTA_NEED_REPAIR);
-- 
2.49.0


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-11-24 18:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-11-12  1:47 [PATCH v2 1/3] f2fs: use memalloc_retry_wait() as much as possible Chao Yu
2025-11-12  1:47 ` [PATCH v2 2/3] f2fs: introduce f2fs_schedule_timeout() Chao Yu
2025-11-12  1:47 ` [PATCH v2 3/3] f2fs: change default schedule timeout value Chao Yu
2025-11-24 18:50 ` [f2fs-dev] [PATCH v2 1/3] f2fs: use memalloc_retry_wait() as much as possible patchwork-bot+f2fs

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox