linux-f2fs-devel.lists.sourceforge.net archive mirror
 help / color / mirror / Atom feed
* [f2fs-dev] [PATCH 1/2] f2fs: fix wrong condition check when failing metapage read
@ 2022-04-11 21:21 Jaegeuk Kim
  2022-04-11 21:21 ` [f2fs-dev] [PATCH 2/2] f2fs: avoid infinite loop to flush node pages Jaegeuk Kim
  2022-04-17  6:36 ` [f2fs-dev] [PATCH 1/2] f2fs: fix wrong condition check when failing metapage read Chao Yu
  0 siblings, 2 replies; 6+ messages in thread
From: Jaegeuk Kim @ 2022-04-11 21:21 UTC (permalink / raw)
  To: linux-kernel, linux-f2fs-devel; +Cc: Jaegeuk Kim

This patch fixes wrong initialization.

Fixes: 50c63009f6ab ("f2fs: avoid an infinite loop in f2fs_sync_dirty_inodes")
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
---
 fs/f2fs/checkpoint.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index aba1b8a1ce66..ed61ac99a3cf 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -98,9 +98,9 @@ static struct page *__get_meta_page(struct f2fs_sb_info *sbi, pgoff_t index,
 	}
 
 	if (unlikely(!PageUptodate(page))) {
-		if (page->index == sbi->metapage_eio_ofs &&
-			sbi->metapage_eio_cnt++ == MAX_RETRY_META_PAGE_EIO) {
-			set_ckpt_flags(sbi, CP_ERROR_FLAG);
+		if (page->index == sbi->metapage_eio_ofs) {
+			if (sbi->metapage_eio_cnt++ == MAX_RETRY_META_PAGE_EIO)
+				set_ckpt_flags(sbi, CP_ERROR_FLAG);
 		} else {
 			sbi->metapage_eio_ofs = page->index;
 			sbi->metapage_eio_cnt = 0;
-- 
2.35.1.1178.g4f1659d476-goog



_______________________________________________
Linux-f2fs-devel mailing list
Linux-f2fs-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel

^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-04-19 23:00 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-04-11 21:21 [f2fs-dev] [PATCH 1/2] f2fs: fix wrong condition check when failing metapage read Jaegeuk Kim
2022-04-11 21:21 ` [f2fs-dev] [PATCH 2/2] f2fs: avoid infinite loop to flush node pages Jaegeuk Kim
2022-04-14 22:27   ` [f2fs-dev] [PATCH 2/2 v2] " Jaegeuk Kim
2022-04-17  6:41     ` Chao Yu
2022-04-19 23:00     ` [f2fs-dev] [PATCH 2/2 v3] " Jaegeuk Kim
2022-04-17  6:36 ` [f2fs-dev] [PATCH 1/2] f2fs: fix wrong condition check when failing metapage read Chao Yu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).