summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorJaegeuk Kim <jaegeuk@kernel.org>2022-03-29 11:28:07 -0700
committerJaegeuk Kim <jaegeuk@kernel.org>2022-04-20 11:16:43 -0700
commit27275f181c7add59c211c7e40c442d8004b1e664 (patch)
treee3b2f3d0b4cef70fdfee59e1d03e118b6e14ae52 /fs
parent0adc2ab0e8a88a0e8b98dae5fc1443ae8c7062ba (diff)
downloadlinux-27275f181c7add59c211c7e40c442d8004b1e664.tar.gz
linux-27275f181c7add59c211c7e40c442d8004b1e664.tar.bz2
linux-27275f181c7add59c211c7e40c442d8004b1e664.zip
f2fs: fix wrong condition check when failing metapage read
This patch fixes wrong initialization. Fixes: 50c63009f6ab ("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>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/checkpoint.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index f5366feea82d..909085a78f9c 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -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;