Skip to contentSkip to conversation

f2fs: do not count ENOENT for error case

PATCH New Jaegeuk Kim 1 participant 1 message Jun 18, 2022

Subsystems (2)
lore
Share & tools
lore

Jaegeuk Kim

author maintainer
#0 lore raw

PATCH 1/1 f2fs: do not count ENOENT for error case

Otherwise, we can get a wrong cp_error mark.

Fixes a7b8618aa2f0 ("f2fs: avoid infinite loop to flush node pages")
---
 fs/f2fs/node.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
fs/f2fs/node.c +3 -1
index 4181d03a7ef7..095a634436e3 100644
@@ -1450,7 +1450,9 @@ static struct page *__get_node_page(struct f2fs_sb_info *sbi, pgoff_t nid,
 out_err:
 	ClearPageUptodate(page);
 out_put_err:
-	f2fs_handle_page_eio(sbi, page->index, NODE);
+	/* ENOENT comes from read_node_page which is not an error. */
+	if (err != -ENOENT)
+		f2fs_handle_page_eio(sbi, page->index, NODE);
 	f2fs_put_page(page, 1);
 	return ERR_PTR(err);
 }
Signature · 1 line
2.36.1.476.g0c4daa206d-goog