Skip to content

Commit

Permalink
f2fs: call f2fs_get_meta_page_retry for nat page
Browse files Browse the repository at this point in the history
[ Upstream commit 3acc452 ]

When running fault injection test, if we don't stop checkpoint, some stale
NAT entries were flushed which breaks consistency.

Fixes: 86f3360 ("f2fs: handle errors of f2fs_get_meta_page_nofail")
Reviewed-by: Chao Yu <yuchao0@huawei.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Jaegeuk Kim authored and gregkh committed Dec 30, 2020
1 parent 311da23 commit 0a8f14b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/f2fs/node.c
Expand Up @@ -109,7 +109,7 @@ static void clear_node_page_dirty(struct page *page)

static struct page *get_current_nat_page(struct f2fs_sb_info *sbi, nid_t nid)
{
return f2fs_get_meta_page(sbi, current_nat_addr(sbi, nid));
return f2fs_get_meta_page_retry(sbi, current_nat_addr(sbi, nid));
}

static struct page *get_next_nat_page(struct f2fs_sb_info *sbi, nid_t nid)
Expand Down

0 comments on commit 0a8f14b

Please sign in to comment.