aboutsummaryrefslogtreecommitdiffstats
path: root/fs/f2fs/checkpoint.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/f2fs/checkpoint.c')
-rw-r--r--fs/f2fs/checkpoint.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/fs/f2fs/checkpoint.c b/fs/f2fs/checkpoint.c
index 79f82819086f..19021414d195 100644
--- a/fs/f2fs/checkpoint.c
+++ b/fs/f2fs/checkpoint.c
@@ -190,7 +190,7 @@ static int f2fs_write_meta_page(struct page *page,
190 190
191 trace_f2fs_writepage(page, META); 191 trace_f2fs_writepage(page, META);
192 192
193 if (unlikely(sbi->por_doing)) 193 if (unlikely(is_sbi_flag_set(sbi, SBI_POR_DOING)))
194 goto redirty_out; 194 goto redirty_out;
195 if (wbc->for_reclaim && page->index < GET_SUM_BLOCK(sbi, 0)) 195 if (wbc->for_reclaim && page->index < GET_SUM_BLOCK(sbi, 0))
196 goto redirty_out; 196 goto redirty_out;
@@ -485,7 +485,7 @@ void recover_orphan_inodes(struct f2fs_sb_info *sbi)
485 if (!is_set_ckpt_flags(F2FS_CKPT(sbi), CP_ORPHAN_PRESENT_FLAG)) 485 if (!is_set_ckpt_flags(F2FS_CKPT(sbi), CP_ORPHAN_PRESENT_FLAG))
486 return; 486 return;
487 487
488 sbi->por_doing = true; 488 set_sbi_flag(sbi, SBI_POR_DOING);
489 489
490 start_blk = __start_cp_addr(sbi) + 1 + 490 start_blk = __start_cp_addr(sbi) + 1 +
491 le32_to_cpu(F2FS_RAW_SUPER(sbi)->cp_payload); 491 le32_to_cpu(F2FS_RAW_SUPER(sbi)->cp_payload);
@@ -506,7 +506,7 @@ void recover_orphan_inodes(struct f2fs_sb_info *sbi)
506 } 506 }
507 /* clear Orphan Flag */ 507 /* clear Orphan Flag */
508 clear_ckpt_flags(F2FS_CKPT(sbi), CP_ORPHAN_PRESENT_FLAG); 508 clear_ckpt_flags(F2FS_CKPT(sbi), CP_ORPHAN_PRESENT_FLAG);
509 sbi->por_doing = false; 509 clear_sbi_flag(sbi, SBI_POR_DOING);
510 return; 510 return;
511} 511}
512 512
@@ -973,7 +973,7 @@ static void do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc)
973 else 973 else
974 clear_ckpt_flags(ckpt, CP_ORPHAN_PRESENT_FLAG); 974 clear_ckpt_flags(ckpt, CP_ORPHAN_PRESENT_FLAG);
975 975
976 if (sbi->need_fsck) 976 if (is_sbi_flag_set(sbi, SBI_NEED_FSCK))
977 set_ckpt_flags(ckpt, CP_FSCK_FLAG); 977 set_ckpt_flags(ckpt, CP_FSCK_FLAG);
978 978
979 /* update SIT/NAT bitmap */ 979 /* update SIT/NAT bitmap */
@@ -1047,7 +1047,7 @@ static void do_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc)
1047 return; 1047 return;
1048 1048
1049 clear_prefree_segments(sbi); 1049 clear_prefree_segments(sbi);
1050 F2FS_RESET_SB_DIRT(sbi); 1050 clear_sbi_flag(sbi, SBI_IS_DIRTY);
1051} 1051}
1052 1052
1053/* 1053/*
@@ -1062,7 +1062,7 @@ void write_checkpoint(struct f2fs_sb_info *sbi, struct cp_control *cpc)
1062 1062
1063 mutex_lock(&sbi->cp_mutex); 1063 mutex_lock(&sbi->cp_mutex);
1064 1064
1065 if (!sbi->s_dirty && 1065 if (!is_sbi_flag_set(sbi, SBI_IS_DIRTY) &&
1066 cpc->reason != CP_DISCARD && cpc->reason != CP_UMOUNT) 1066 cpc->reason != CP_DISCARD && cpc->reason != CP_UMOUNT)
1067 goto out; 1067 goto out;
1068 if (unlikely(f2fs_cp_error(sbi))) 1068 if (unlikely(f2fs_cp_error(sbi)))