diff options
author | Chao Yu <chao2.yu@samsung.com> | 2015-11-30 22:56:52 -0500 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-12-04 15:07:57 -0500 |
commit | 3519e3f992995d46c200134cfbf84c61b7a01f4c (patch) | |
tree | 74377f8e784a9d32c68505b2d9ac2751db66b509 /fs/f2fs/debug.c | |
parent | 9006f2c93fe5cc450bc0d3a4924b46393f165b4a (diff) |
f2fs: use sbi->blocks_per_seg to avoid unnecessary calculation
Use sbi->blocks_per_seg directly to avoid unnecessary calculation when using
1 << sbi->log_blocks_per_seg.
Signed-off-by: Chao Yu <chao2.yu@samsung.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/debug.c')
-rw-r--r-- | fs/f2fs/debug.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/debug.c b/fs/f2fs/debug.c index b0966f3b1c9a..8ce2fe3f65ab 100644 --- a/fs/f2fs/debug.c +++ b/fs/f2fs/debug.c | |||
@@ -105,7 +105,7 @@ static void update_sit_info(struct f2fs_sb_info *sbi) | |||
105 | 105 | ||
106 | bimodal = 0; | 106 | bimodal = 0; |
107 | total_vblocks = 0; | 107 | total_vblocks = 0; |
108 | blks_per_sec = sbi->segs_per_sec * (1 << sbi->log_blocks_per_seg); | 108 | blks_per_sec = sbi->segs_per_sec * sbi->blocks_per_seg; |
109 | hblks_per_sec = blks_per_sec / 2; | 109 | hblks_per_sec = blks_per_sec / 2; |
110 | for (segno = 0; segno < MAIN_SEGS(sbi); segno += sbi->segs_per_sec) { | 110 | for (segno = 0; segno < MAIN_SEGS(sbi); segno += sbi->segs_per_sec) { |
111 | vblocks = get_valid_blocks(sbi, segno, sbi->segs_per_sec); | 111 | vblocks = get_valid_blocks(sbi, segno, sbi->segs_per_sec); |