aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorChao Yu <chao2.yu@samsung.com>2014-09-04 06:11:47 -0400
committerJaegeuk Kim <jaegeuk@kernel.org>2014-09-09 16:15:05 -0400
commitd3a14afd5ed1970519a2d6ed59f4062ec3ba821f (patch)
treeb768516a46c5a88090c34eed158ace6083ec7a25 /fs
parentb0c44f05a2b719f3ecfa4673c04d80a17bb23e92 (diff)
f2fs: remove unneeded sit_i in macro SIT_BLOCK_OFFSET/START_SEGNO
sit_i in macro SIT_BLOCK_OFFSET/START_SEGNO is not used, remove it. Signed-off-by: Chao Yu <chao2.yu@samsung.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/segment.c4
-rw-r--r--fs/f2fs/segment.h10
2 files changed, 7 insertions, 7 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index 853c8f5445fd..a6b90a520894 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -1403,7 +1403,7 @@ static struct page *get_current_sit_page(struct f2fs_sb_info *sbi,
1403 unsigned int segno) 1403 unsigned int segno)
1404{ 1404{
1405 struct sit_info *sit_i = SIT_I(sbi); 1405 struct sit_info *sit_i = SIT_I(sbi);
1406 unsigned int offset = SIT_BLOCK_OFFSET(sit_i, segno); 1406 unsigned int offset = SIT_BLOCK_OFFSET(segno);
1407 block_t blk_addr = sit_i->sit_base_addr + offset; 1407 block_t blk_addr = sit_i->sit_base_addr + offset;
1408 1408
1409 check_seg_range(sbi, segno); 1409 check_seg_range(sbi, segno);
@@ -1518,7 +1518,7 @@ to_sit_page:
1518 page = NULL; 1518 page = NULL;
1519 } 1519 }
1520 1520
1521 start = START_SEGNO(sit_i, segno); 1521 start = START_SEGNO(segno);
1522 end = start + SIT_ENTRY_PER_BLOCK - 1; 1522 end = start + SIT_ENTRY_PER_BLOCK - 1;
1523 1523
1524 /* read sit block that will be updated */ 1524 /* read sit block that will be updated */
diff --git a/fs/f2fs/segment.h b/fs/f2fs/segment.h
index d163fc854ac1..2548bfdf0240 100644
--- a/fs/f2fs/segment.h
+++ b/fs/f2fs/segment.h
@@ -77,10 +77,10 @@
77 77
78#define SIT_ENTRY_OFFSET(sit_i, segno) \ 78#define SIT_ENTRY_OFFSET(sit_i, segno) \
79 (segno % sit_i->sents_per_block) 79 (segno % sit_i->sents_per_block)
80#define SIT_BLOCK_OFFSET(sit_i, segno) \ 80#define SIT_BLOCK_OFFSET(segno) \
81 (segno / SIT_ENTRY_PER_BLOCK) 81 (segno / SIT_ENTRY_PER_BLOCK)
82#define START_SEGNO(sit_i, segno) \ 82#define START_SEGNO(segno) \
83 (SIT_BLOCK_OFFSET(sit_i, segno) * SIT_ENTRY_PER_BLOCK) 83 (SIT_BLOCK_OFFSET(segno) * SIT_ENTRY_PER_BLOCK)
84#define SIT_BLK_CNT(sbi) \ 84#define SIT_BLK_CNT(sbi) \
85 ((TOTAL_SEGS(sbi) + SIT_ENTRY_PER_BLOCK - 1) / SIT_ENTRY_PER_BLOCK) 85 ((TOTAL_SEGS(sbi) + SIT_ENTRY_PER_BLOCK - 1) / SIT_ENTRY_PER_BLOCK)
86#define f2fs_bitmap_size(nr) \ 86#define f2fs_bitmap_size(nr) \
@@ -624,7 +624,7 @@ static inline pgoff_t current_sit_addr(struct f2fs_sb_info *sbi,
624 unsigned int start) 624 unsigned int start)
625{ 625{
626 struct sit_info *sit_i = SIT_I(sbi); 626 struct sit_info *sit_i = SIT_I(sbi);
627 unsigned int offset = SIT_BLOCK_OFFSET(sit_i, start); 627 unsigned int offset = SIT_BLOCK_OFFSET(start);
628 block_t blk_addr = sit_i->sit_base_addr + offset; 628 block_t blk_addr = sit_i->sit_base_addr + offset;
629 629
630 check_seg_range(sbi, start); 630 check_seg_range(sbi, start);
@@ -651,7 +651,7 @@ static inline pgoff_t next_sit_addr(struct f2fs_sb_info *sbi,
651 651
652static inline void set_to_next_sit(struct sit_info *sit_i, unsigned int start) 652static inline void set_to_next_sit(struct sit_info *sit_i, unsigned int start)
653{ 653{
654 unsigned int block_off = SIT_BLOCK_OFFSET(sit_i, start); 654 unsigned int block_off = SIT_BLOCK_OFFSET(start);
655 655
656 if (f2fs_test_bit(block_off, sit_i->sit_bitmap)) 656 if (f2fs_test_bit(block_off, sit_i->sit_bitmap))
657 f2fs_clear_bit(block_off, sit_i->sit_bitmap); 657 f2fs_clear_bit(block_off, sit_i->sit_bitmap);