Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

f2fs: use memalloc_retry_wait() as much as possible

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

Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>

authored by

Chao Yu and committed by
Jaegeuk Kim
30a84966 89732017

+2 -2
+1 -1
fs/f2fs/segment.c
··· 234 234 err = f2fs_get_dnode_of_data(&dn, index, ALLOC_NODE); 235 235 if (err) { 236 236 if (err == -ENOMEM) { 237 - f2fs_io_schedule_timeout(DEFAULT_IO_TIMEOUT); 237 + memalloc_retry_wait(GFP_NOFS); 238 238 goto retry; 239 239 } 240 240 return err;
+1 -1
fs/f2fs/super.c
··· 3139 3139 &folio, &fsdata); 3140 3140 if (unlikely(err)) { 3141 3141 if (err == -ENOMEM) { 3142 - f2fs_io_schedule_timeout(DEFAULT_IO_TIMEOUT); 3142 + memalloc_retry_wait(GFP_NOFS); 3143 3143 goto retry; 3144 3144 } 3145 3145 set_sbi_flag(F2FS_SB(sb), SBI_QUOTA_NEED_REPAIR);