summaryrefslogtreecommitdiff
path: root/fs
diff options
context:
space:
mode:
authorHaicheng Li <haicheng.li@linux.intel.com>2013-06-13 16:59:27 +0800
committerChanho Park <chanho61.park@samsung.com>2014-11-18 11:43:51 +0900
commitbc6f8a679087f3061a9768b21a370c7a6181a87f (patch)
tree354fa138a182fd2a39cad6b58f65c247cd7d9a10 /fs
parentb3e6e9cfd627a3fa07a62daed48b58fac1b07c24 (diff)
downloadlinux-3.10-bc6f8a679087f3061a9768b21a370c7a6181a87f.tar.gz
linux-3.10-bc6f8a679087f3061a9768b21a370c7a6181a87f.tar.bz2
linux-3.10-bc6f8a679087f3061a9768b21a370c7a6181a87f.zip
f2fs: remove unnecessary parameter "offset" from __add_sum_entry()
We can get the value directly from pointer "curseg". Signed-off-by: Haicheng Li <haicheng.li@linux.intel.com> Signed-off-by: Jaegeuk Kim <jaegeuk.kim@samsung.com>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/segment.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c
index be668ffb001..77f31c0584e 100644
--- a/fs/f2fs/segment.c
+++ b/fs/f2fs/segment.c
@@ -255,11 +255,11 @@ void invalidate_blocks(struct f2fs_sb_info *sbi, block_t addr)
* This function should be resided under the curseg_mutex lock
*/
static void __add_sum_entry(struct f2fs_sb_info *sbi, int type,
- struct f2fs_summary *sum, unsigned short offset)
+ struct f2fs_summary *sum)
{
struct curseg_info *curseg = CURSEG_I(sbi, type);
void *addr = curseg->sum_blk;
- addr += offset * sizeof(struct f2fs_summary);
+ addr += curseg->next_blkoff * sizeof(struct f2fs_summary);
memcpy(addr, sum, sizeof(struct f2fs_summary));
return;
}
@@ -845,7 +845,7 @@ static void do_write_page(struct f2fs_sb_info *sbi, struct page *page,
* because, this function updates a summary entry in the
* current summary block.
*/
- __add_sum_entry(sbi, type, sum, curseg->next_blkoff);
+ __add_sum_entry(sbi, type, sum);
mutex_lock(&sit_i->sentry_lock);
__refresh_next_blkoff(sbi, curseg);
@@ -946,7 +946,7 @@ void recover_data_page(struct f2fs_sb_info *sbi,
curseg->next_blkoff = GET_SEGOFF_FROM_SEG0(sbi, new_blkaddr) &
(sbi->blocks_per_seg - 1);
- __add_sum_entry(sbi, type, sum, curseg->next_blkoff);
+ __add_sum_entry(sbi, type, sum);
refresh_sit_entry(sbi, old_blkaddr, new_blkaddr);
@@ -983,7 +983,7 @@ void rewrite_node_page(struct f2fs_sb_info *sbi,
}
curseg->next_blkoff = GET_SEGOFF_FROM_SEG0(sbi, new_blkaddr) &
(sbi->blocks_per_seg - 1);
- __add_sum_entry(sbi, type, sum, curseg->next_blkoff);
+ __add_sum_entry(sbi, type, sum);
/* change the current log to the next block addr in advance */
if (next_segno != segno) {