summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/node.h
diff options
context:
space:
mode:
authorChao Yu2015-12-01 04:56:52 +0100
committerJaegeuk Kim2015-12-04 21:07:57 +0100
commit3519e3f992995d46c200134cfbf84c61b7a01f4c (patch)
tree74377f8e784a9d32c68505b2d9ac2751db66b509 /fs/f2fs/node.h
parentf2fs: kill f2fs_drop_largest_extent (diff)
downloadkernel-qcow2-linux-3519e3f992995d46c200134cfbf84c61b7a01f4c.tar.gz
kernel-qcow2-linux-3519e3f992995d46c200134cfbf84c61b7a01f4c.tar.xz
kernel-qcow2-linux-3519e3f992995d46c200134cfbf84c61b7a01f4c.zip
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/node.h')
-rw-r--r--fs/f2fs/node.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/f2fs/node.h b/fs/f2fs/node.h
index e4fffd2d98c4..2de759a7746f 100644
--- a/fs/f2fs/node.h
+++ b/fs/f2fs/node.h
@@ -183,7 +183,7 @@ static inline pgoff_t current_nat_addr(struct f2fs_sb_info *sbi, nid_t start)
block_addr = (pgoff_t)(nm_i->nat_blkaddr +
(seg_off << sbi->log_blocks_per_seg << 1) +
- (block_off & ((1 << sbi->log_blocks_per_seg) - 1)));
+ (block_off & (sbi->blocks_per_seg - 1)));
if (f2fs_test_bit(block_off, nm_i->nat_bitmap))
block_addr += sbi->blocks_per_seg;