]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/commitdiff
f2fs: call f2fs_get_meta_page_retry for nat page
authorJaegeuk Kim <jaegeuk@kernel.org>
Sun, 25 Oct 2020 14:35:47 +0000 (07:35 -0700)
committerPaolo Pisati <paolo.pisati@canonical.com>
Mon, 4 Jan 2021 15:36:32 +0000 (16:36 +0100)
BugLink: https://bugs.launchpad.net/bugs/1910111
[ Upstream commit 3acc4522d89e0a326db69e9d0afaad8cf763a54c ]

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

Fixes: 86f33603f8c5 ("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>
Signed-off-by: Paolo Pisati <paolo.pisati@canonical.com>
fs/f2fs/node.c

index d5d8ce077f2959a7eb99c695983d9aa3e4972b06..42394de6c7eb1d76a7f13b565b9c3d73d3ad6674 100644 (file)
@@ -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)