BACKPORT: f2fs: do not count ENOENT for error case

Otherwise, we can get a wrong cp_error mark.

Bug: 239451498
Cc: <[email protected]>
Fixes: a7b8618aa2f0 ("f2fs: avoid infinite loop to flush node pages")
Signed-off-by: Jaegeuk Kim <[email protected]>
(cherry picked from commit 1a81f1ba6f9e0e7ab72b32bbd8184892319f1583)
Change-Id: Ic28a139341e96cb6fb0eca9f614895ae14e96946
diff --git a/fs/f2fs/node.c b/fs/f2fs/node.c
index db60176..ed09cdca 100644
--- a/fs/f2fs/node.c
+++ b/fs/f2fs/node.c
@@ -1454,7 +1454,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);
 }