Skip to content

Commit 30a8496

Browse files
chaseyuJaegeuk Kim
authored andcommitted
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 <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 8973201 commit 30a8496

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

fs/f2fs/segment.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ static int __replace_atomic_write_block(struct inode *inode, pgoff_t index,
234234
err = f2fs_get_dnode_of_data(&dn, index, ALLOC_NODE);
235235
if (err) {
236236
if (err == -ENOMEM) {
237-
f2fs_io_schedule_timeout(DEFAULT_IO_TIMEOUT);
237+
memalloc_retry_wait(GFP_NOFS);
238238
goto retry;
239239
}
240240
return err;

fs/f2fs/super.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3139,7 +3139,7 @@ static ssize_t f2fs_quota_write(struct super_block *sb, int type,
31393139
&folio, &fsdata);
31403140
if (unlikely(err)) {
31413141
if (err == -ENOMEM) {
3142-
f2fs_io_schedule_timeout(DEFAULT_IO_TIMEOUT);
3142+
memalloc_retry_wait(GFP_NOFS);
31433143
goto retry;
31443144
}
31453145
set_sbi_flag(F2FS_SB(sb), SBI_QUOTA_NEED_REPAIR);

0 commit comments

Comments
 (0)