BACKPORT: f2fs: fix wrong condition check when failing metapage read
This patch fixes wrong initialization.
Bug: 228919347
Fixes: 50c63009f6ab ("f2fs: avoid an infinite loop in f2fs_sync_dirty_inodes")
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
(cherry picked from commit 91e1b07af1bf34a999a7e08e4966f1b50d4887a2)
Change-Id: I283ae3200254b1513d35ac243c1008a7c75d71b1
This commit is contained in:
@@ -98,9 +98,9 @@ repeat:
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
Reference in New Issue
Block a user