summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorSheng Yong <shengyong@oppo.com>2024-11-21 09:26:57 +0100
committerJaegeuk Kim <jaegeuk@kernel.org>2024-11-21 17:14:07 +0100
commitf88c7904b5c7e35ab8037e2a59e10d80adf6fd7e (patch)
treeff52c33a95fdf674543f9ccdf373a1fb74655020 /fs
parentf2fs: fix changing cursegs if recovery fails on zoned device (diff)
downloadlinux-f88c7904b5c7e35ab8037e2a59e10d80adf6fd7e.tar.xz
linux-f88c7904b5c7e35ab8037e2a59e10d80adf6fd7e.zip
f2fs: clear SBI_POR_DOING before initing inmem curseg
SBI_POR_DOING can be cleared after recovery is completed, so that changes made before recovery can be persistent, and subsequent errors can be recorded into cp/sb. Signed-off-by: Song Feng <songfeng@oppo.com> Signed-off-by: Yongpeng Yang <yangyongpeng1@oppo.com> Signed-off-by: Sheng Yong <shengyong@oppo.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to '')
-rw-r--r--fs/f2fs/super.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index 41cc13b43ce1..c0670cd61956 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -4784,13 +4784,13 @@ reset_checkpoint:
if (err)
goto free_meta;
+ /* f2fs_recover_fsync_data() cleared this already */
+ clear_sbi_flag(sbi, SBI_POR_DOING);
+
err = f2fs_init_inmem_curseg(sbi);
if (err)
goto sync_free_meta;
- /* f2fs_recover_fsync_data() cleared this already */
- clear_sbi_flag(sbi, SBI_POR_DOING);
-
if (test_opt(sbi, DISABLE_CHECKPOINT)) {
err = f2fs_disable_checkpoint(sbi);
if (err)