diff options
-rw-r--r-- | fs/f2fs/segment.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/f2fs/segment.c b/fs/f2fs/segment.c index be668ffb001c..77f31c0584e5 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) | |||
255 | * This function should be resided under the curseg_mutex lock | 255 | * This function should be resided under the curseg_mutex lock |
256 | */ | 256 | */ |
257 | static void __add_sum_entry(struct f2fs_sb_info *sbi, int type, | 257 | static void __add_sum_entry(struct f2fs_sb_info *sbi, int type, |
258 | struct f2fs_summary *sum, unsigned short offset) | 258 | struct f2fs_summary *sum) |
259 | { | 259 | { |
260 | struct curseg_info *curseg = CURSEG_I(sbi, type); | 260 | struct curseg_info *curseg = CURSEG_I(sbi, type); |
261 | void *addr = curseg->sum_blk; | 261 | void *addr = curseg->sum_blk; |
262 | addr += offset * sizeof(struct f2fs_summary); | 262 | addr += curseg->next_blkoff * sizeof(struct f2fs_summary); |
263 | memcpy(addr, sum, sizeof(struct f2fs_summary)); | 263 | memcpy(addr, sum, sizeof(struct f2fs_summary)); |
264 | return; | 264 | return; |
265 | } | 265 | } |
@@ -845,7 +845,7 @@ static void do_write_page(struct f2fs_sb_info *sbi, struct page *page, | |||
845 | * because, this function updates a summary entry in the | 845 | * because, this function updates a summary entry in the |
846 | * current summary block. | 846 | * current summary block. |
847 | */ | 847 | */ |
848 | __add_sum_entry(sbi, type, sum, curseg->next_blkoff); | 848 | __add_sum_entry(sbi, type, sum); |
849 | 849 | ||
850 | mutex_lock(&sit_i->sentry_lock); | 850 | mutex_lock(&sit_i->sentry_lock); |
851 | __refresh_next_blkoff(sbi, curseg); | 851 | __refresh_next_blkoff(sbi, curseg); |
@@ -946,7 +946,7 @@ void recover_data_page(struct f2fs_sb_info *sbi, | |||
946 | 946 | ||
947 | curseg->next_blkoff = GET_SEGOFF_FROM_SEG0(sbi, new_blkaddr) & | 947 | curseg->next_blkoff = GET_SEGOFF_FROM_SEG0(sbi, new_blkaddr) & |
948 | (sbi->blocks_per_seg - 1); | 948 | (sbi->blocks_per_seg - 1); |
949 | __add_sum_entry(sbi, type, sum, curseg->next_blkoff); | 949 | __add_sum_entry(sbi, type, sum); |
950 | 950 | ||
951 | refresh_sit_entry(sbi, old_blkaddr, new_blkaddr); | 951 | refresh_sit_entry(sbi, old_blkaddr, new_blkaddr); |
952 | 952 | ||
@@ -983,7 +983,7 @@ void rewrite_node_page(struct f2fs_sb_info *sbi, | |||
983 | } | 983 | } |
984 | curseg->next_blkoff = GET_SEGOFF_FROM_SEG0(sbi, new_blkaddr) & | 984 | curseg->next_blkoff = GET_SEGOFF_FROM_SEG0(sbi, new_blkaddr) & |
985 | (sbi->blocks_per_seg - 1); | 985 | (sbi->blocks_per_seg - 1); |
986 | __add_sum_entry(sbi, type, sum, curseg->next_blkoff); | 986 | __add_sum_entry(sbi, type, sum); |
987 | 987 | ||
988 | /* change the current log to the next block addr in advance */ | 988 | /* change the current log to the next block addr in advance */ |
989 | if (next_segno != segno) { | 989 | if (next_segno != segno) { |