File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -5549,8 +5549,10 @@ unsigned long long f2fs_get_section_mtime(struct f2fs_sb_info *sbi,
5549
5549
secno = GET_SEC_FROM_SEG (sbi , segno );
5550
5550
start = GET_SEG_FROM_SEC (sbi , secno );
5551
5551
5552
- if (!__is_large_section (sbi ))
5553
- return get_seg_entry (sbi , start + i )-> mtime ;
5552
+ if (!__is_large_section (sbi )) {
5553
+ mtime = get_seg_entry (sbi , start + i )-> mtime ;
5554
+ goto out ;
5555
+ }
5554
5556
5555
5557
for (i = 0 ; i < usable_segs_per_sec ; i ++ ) {
5556
5558
/* for large section, only check the mtime of valid segments */
@@ -5563,7 +5565,11 @@ unsigned long long f2fs_get_section_mtime(struct f2fs_sb_info *sbi,
5563
5565
if (total_valid_blocks == 0 )
5564
5566
return INVALID_MTIME ;
5565
5567
5566
- return div_u64 (mtime , total_valid_blocks );
5568
+ mtime = div_u64 (mtime , total_valid_blocks );
5569
+ out :
5570
+ if (unlikely (mtime == INVALID_MTIME ))
5571
+ mtime -= 1 ;
5572
+ return mtime ;
5567
5573
}
5568
5574
5569
5575
/*
You can’t perform that action at this time.
0 commit comments