]> git.baikalelectronics.ru Git - kernel.git/commitdiff
f2fs: do not count ENOENT for error case
authorJaegeuk Kim <jaegeuk@kernel.org>
Sat, 18 Jun 2022 07:42:24 +0000 (00:42 -0700)
committerJaegeuk Kim <jaegeuk@kernel.org>
Tue, 21 Jun 2022 15:29:56 +0000 (08:29 -0700)
Otherwise, we can get a wrong cp_error mark.

Cc: <stable@vger.kernel.org>
Fixes: d0120aa5ee5c ("f2fs: avoid infinite loop to flush node pages")
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/node.c

index 836c79a20afc6bc7e6ed4612971aa844c7d2d24d..cf6f7fc83c08290f6cd53fd395fdabbf66b6fd49 100644 (file)
@@ -1450,7 +1450,9 @@ page_hit:
 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);
 }