f2fs: fix wrong condition check when failing metapage read
This patch fixes wrong initialization.
Fixes: 50c63009f6 ("f2fs: avoid an infinite loop in f2fs_sync_dirty_inodes")
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
@@ -98,9 +98,9 @@ repeat:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (unlikely(!PageUptodate(page))) {
|
if (unlikely(!PageUptodate(page))) {
|
||||||
if (page->index == sbi->metapage_eio_ofs &&
|
if (page->index == sbi->metapage_eio_ofs) {
|
||||||
sbi->metapage_eio_cnt++ == MAX_RETRY_META_PAGE_EIO) {
|
if (sbi->metapage_eio_cnt++ == MAX_RETRY_META_PAGE_EIO)
|
||||||
set_ckpt_flags(sbi, CP_ERROR_FLAG);
|
set_ckpt_flags(sbi, CP_ERROR_FLAG);
|
||||||
} else {
|
} else {
|
||||||
sbi->metapage_eio_ofs = page->index;
|
sbi->metapage_eio_ofs = page->index;
|
||||||
sbi->metapage_eio_cnt = 0;
|
sbi->metapage_eio_cnt = 0;
|
||||||
|
|||||||
Reference in New Issue
Block a user