hc
2024-05-10 9999e48639b3cecb08ffb37358bcba3b48161b29
kernel/fs/f2fs/checkpoint.c
....@@ -315,8 +315,15 @@
315315
316316 trace_f2fs_writepage(page, META);
317317
318
- if (unlikely(f2fs_cp_error(sbi)))
318
+ if (unlikely(f2fs_cp_error(sbi))) {
319
+ if (is_sbi_flag_set(sbi, SBI_IS_CLOSE)) {
320
+ ClearPageUptodate(page);
321
+ dec_page_count(sbi, F2FS_DIRTY_META);
322
+ unlock_page(page);
323
+ return 0;
324
+ }
319325 goto redirty_out;
326
+ }
320327 if (unlikely(is_sbi_flag_set(sbi, SBI_POR_DOING)))
321328 goto redirty_out;
322329 if (wbc->for_reclaim && page->index < GET_SUM_BLOCK(sbi, 0))
....@@ -1288,7 +1295,8 @@
12881295 if (!get_pages(sbi, type))
12891296 break;
12901297
1291
- if (unlikely(f2fs_cp_error(sbi)))
1298
+ if (unlikely(f2fs_cp_error(sbi) &&
1299
+ !is_sbi_flag_set(sbi, SBI_IS_CLOSE)))
12921300 break;
12931301
12941302 if (type == F2FS_DIRTY_META)