diff options
author | Chao Yu <chao@kernel.org> | 2024-03-04 04:28:55 +0100 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2024-03-04 19:18:26 +0100 |
commit | 45809cd3bdac8743f08e42a32121e035aee69d88 (patch) | |
tree | f7551ba1b89380ac6e4cb2eab2dfd4efba05f088 /fs/f2fs/gc.h | |
parent | f2fs: fix to check return value of f2fs_gc_range (diff) | |
download | linux-45809cd3bdac8743f08e42a32121e035aee69d88.tar.xz linux-45809cd3bdac8743f08e42a32121e035aee69d88.zip |
f2fs: introduce SEGS_TO_BLKS/BLKS_TO_SEGS for cleanup
Just cleanup, no functional change.
Signed-off-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/gc.h')
-rw-r--r-- | fs/f2fs/gc.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/gc.h b/fs/f2fs/gc.h index 28a00942802c..9c0d06c4d19a 100644 --- a/fs/f2fs/gc.h +++ b/fs/f2fs/gc.h @@ -96,7 +96,7 @@ static inline block_t free_segs_blk_count(struct f2fs_sb_info *sbi) if (f2fs_sb_has_blkzoned(sbi)) return free_segs_blk_count_zoned(sbi); - return free_segments(sbi) << sbi->log_blocks_per_seg; + return SEGS_TO_BLKS(sbi, free_segments(sbi)); } static inline block_t free_user_blocks(struct f2fs_sb_info *sbi) @@ -104,7 +104,7 @@ static inline block_t free_user_blocks(struct f2fs_sb_info *sbi) block_t free_blks, ovp_blks; free_blks = free_segs_blk_count(sbi); - ovp_blks = overprovision_segments(sbi) << sbi->log_blocks_per_seg; + ovp_blks = SEGS_TO_BLKS(sbi, overprovision_segments(sbi)); if (free_blks < ovp_blks) return 0; |