summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/segment.c
diff options
context:
space:
mode:
authorGu Zheng <guz.fnst@cn.fujitsu.com>2014-10-20 17:45:49 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2014-11-03 16:07:37 -0800
commit2cc221861132e0ca54e3f52d506520ded8520e80 (patch)
tree7d98b746dee713fd78fc99c790d29d116c73f597 /fs/f2fs/segment.c
parent52aca07425088954384eb503d8e3442d81b9d18c (diff)
downloadtalos-obmc-linux-2cc221861132e0ca54e3f52d506520ded8520e80.tar.gz
talos-obmc-linux-2cc221861132e0ca54e3f52d506520ded8520e80.zip
f2fs: use current_sit_addr to replace the open code
Signed-off-by: Gu Zheng <guz.fnst@cn.fujitsu.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/segment.c')
-rw-r--r--fs/f2fs/segment.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 19de23b119fa..21ccc4816474 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -1552,17 +1552,7 @@ int lookup_journal_in_cursum(struct f2fs_summary_block *sum, int type,
static struct page *get_current_sit_page(struct f2fs_sb_info *sbi,
unsigned int segno)
{
- struct sit_info *sit_i = SIT_I(sbi);
- unsigned int offset = SIT_BLOCK_OFFSET(segno);
- block_t blk_addr = sit_i->sit_base_addr + offset;
-
- check_seg_range(sbi, segno);
-
- /* calculate sit block address */
- if (f2fs_test_bit(offset, sit_i->sit_bitmap))
- blk_addr += sit_i->sit_blocks;
-
- return get_meta_page(sbi, blk_addr);
+ return get_meta_page(sbi, current_sit_addr(sbi, segno));
}
static struct page *get_next_sit_page(struct f2fs_sb_info *sbi,
OpenPOWER on IntegriCloud