diff options
author | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-09-09 16:59:39 -0700 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2016-09-13 13:02:29 -0700 |
commit | e8ea9b3d7e278d2ef4b60e703f780ceee70cb331 (patch) | |
tree | 2ec0fd1ad038bb20032706ed8bc66552d5df9fdb /fs/f2fs/node.c | |
parent | f4702d61eb53466251eeb677f9784e047e1caf0c (diff) | |
download | linux-next-e8ea9b3d7e278d2ef4b60e703f780ceee70cb331.tar.gz |
f2fs: avoid ENOMEM during roll-forward recovery
This patch gives another chances during roll-forward recovery regarding to
-ENOMEM.
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/node.c')
-rw-r--r-- | fs/f2fs/node.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c index 8a288004e6fd..2322a8e817bf 100644 --- a/fs/f2fs/node.c +++ b/fs/f2fs/node.c @@ -2013,10 +2013,12 @@ int recover_inode_page(struct f2fs_sb_info *sbi, struct page *page) if (unlikely(old_ni.blk_addr != NULL_ADDR)) return -EINVAL; - +retry: ipage = f2fs_grab_cache_page(NODE_MAPPING(sbi), ino, false); - if (!ipage) - return -ENOMEM; + if (!ipage) { + congestion_wait(BLK_RW_ASYNC, HZ/50); + goto retry; + } /* Should not use this inode from free nid list */ remove_free_nid(NM_I(sbi), ino); |