From e8ea9b3d7e278d2ef4b60e703f780ceee70cb331 Mon Sep 17 00:00:00 2001 From: Jaegeuk Kim Date: Fri, 9 Sep 2016 16:59:39 -0700 Subject: f2fs: avoid ENOMEM during roll-forward recovery This patch gives another chances during roll-forward recovery regarding to -ENOMEM. Signed-off-by: Jaegeuk Kim --- fs/f2fs/node.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'fs/f2fs/node.c') 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); -- cgit v1.2.3