mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
f2fs: clean up get_valid_blocks with consistent parameter
This patch cleans up get_valid_blocks, which has no functional change. Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
This commit is contained in:
parent
63fcf8e8d6
commit
302bd34882
5 changed files with 15 additions and 15 deletions
|
@ -636,7 +636,7 @@ static void __remove_dirty_segment(struct f2fs_sb_info *sbi, unsigned int segno,
|
|||
if (test_and_clear_bit(segno, dirty_i->dirty_segmap[t]))
|
||||
dirty_i->nr_dirty[t]--;
|
||||
|
||||
if (get_valid_blocks(sbi, segno, sbi->segs_per_sec) == 0)
|
||||
if (get_valid_blocks(sbi, segno, true) == 0)
|
||||
clear_bit(GET_SECNO(sbi, segno),
|
||||
dirty_i->victim_secmap);
|
||||
}
|
||||
|
@ -657,7 +657,7 @@ static void locate_dirty_segment(struct f2fs_sb_info *sbi, unsigned int segno)
|
|||
|
||||
mutex_lock(&dirty_i->seglist_lock);
|
||||
|
||||
valid_blocks = get_valid_blocks(sbi, segno, 0);
|
||||
valid_blocks = get_valid_blocks(sbi, segno, false);
|
||||
|
||||
if (valid_blocks == 0) {
|
||||
__locate_dirty_segment(sbi, segno, PRE);
|
||||
|
@ -1109,7 +1109,7 @@ next:
|
|||
secno = GET_SECNO(sbi, start);
|
||||
start_segno = secno * sbi->segs_per_sec;
|
||||
if (!IS_CURSEC(sbi, secno) &&
|
||||
!get_valid_blocks(sbi, start, sbi->segs_per_sec))
|
||||
!get_valid_blocks(sbi, start, true))
|
||||
f2fs_issue_discard(sbi, START_BLOCK(sbi, start_segno),
|
||||
sbi->segs_per_sec << sbi->log_blocks_per_seg);
|
||||
|
||||
|
@ -2859,7 +2859,7 @@ static void init_dirty_segmap(struct f2fs_sb_info *sbi)
|
|||
if (segno >= MAIN_SEGS(sbi))
|
||||
break;
|
||||
offset = segno + 1;
|
||||
valid_blocks = get_valid_blocks(sbi, segno, 0);
|
||||
valid_blocks = get_valid_blocks(sbi, segno, false);
|
||||
if (valid_blocks == sbi->blocks_per_seg || !valid_blocks)
|
||||
continue;
|
||||
if (valid_blocks > sbi->blocks_per_seg) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue