Skip to content

Commit 27275f1

Browse files
author
Jaegeuk Kim
committed
f2fs: fix wrong condition check when failing metapage read
This patch fixes wrong initialization. Fixes: 50c6300 ("f2fs: avoid an infinite loop in f2fs_sync_dirty_inodes") Reviewed-by: Chao Yu <[email protected]> Signed-off-by: Jaegeuk Kim <[email protected]>
1 parent 0adc2ab commit 27275f1

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

fs/f2fs/checkpoint.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ static struct page *__get_meta_page(struct f2fs_sb_info *sbi, pgoff_t index,
9898
}
9999

100100
if (unlikely(!PageUptodate(page))) {
101-
if (page->index == sbi->metapage_eio_ofs &&
102-
sbi->metapage_eio_cnt++ == MAX_RETRY_META_PAGE_EIO) {
103-
set_ckpt_flags(sbi, CP_ERROR_FLAG);
101+
if (page->index == sbi->metapage_eio_ofs) {
102+
if (sbi->metapage_eio_cnt++ == MAX_RETRY_META_PAGE_EIO)
103+
set_ckpt_flags(sbi, CP_ERROR_FLAG);
104104
} else {
105105
sbi->metapage_eio_ofs = page->index;
106106
sbi->metapage_eio_cnt = 0;

0 commit comments

Comments
 (0)