diff options
author | Chao Yu <chao2.yu@samsung.com> | 2015-12-01 06:56:52 +0300 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2015-12-04 23:07:57 +0300 |
commit | 3519e3f992995d46c200134cfbf84c61b7a01f4c (patch) | |
tree | 74377f8e784a9d32c68505b2d9ac2751db66b509 /fs/f2fs/gc.c | |
parent | 9006f2c93fe5cc450bc0d3a4924b46393f165b4a (diff) | |
download | linux-3519e3f992995d46c200134cfbf84c61b7a01f4c.tar.xz |
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/gc.c')
-rw-r--r-- | fs/f2fs/gc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/gc.c b/fs/f2fs/gc.c index fedbf67a0842..ce350c44b5cf 100644 --- a/fs/f2fs/gc.c +++ b/fs/f2fs/gc.c @@ -173,9 +173,9 @@ static unsigned int get_max_cost(struct f2fs_sb_info *sbi, { /* SSR allocates in a segment unit */ if (p->alloc_mode == SSR) - return 1 << sbi->log_blocks_per_seg; + return sbi->blocks_per_seg; if (p->gc_mode == GC_GREEDY) - return (1 << sbi->log_blocks_per_seg) * p->ofs_unit; + return sbi->blocks_per_seg * p->ofs_unit; else if (p->gc_mode == GC_CB) return UINT_MAX; else /* No other gc_mode */ |