f2fs: clean up several status-related operations
[deliverable/linux.git] / fs / f2fs / segment.c
index 8ac1619652420a26330d402e8dcf58a18bc049c0..177a33b16b2c78b7367b46330e5c176598a41cb5 100644 (file)
@@ -554,9 +554,8 @@ static void allocate_segment_by_default(struct f2fs_sb_info *sbi,
                change_curseg(sbi, type, true);
        else
                new_curseg(sbi, type, false);
-#ifdef CONFIG_F2FS_STAT_FS
-       sbi->segment_count[curseg->alloc_type]++;
-#endif
+
+       stat_inc_seg_type(sbi, curseg);
 }
 
 void allocate_new_segments(struct f2fs_sb_info *sbi)
@@ -811,9 +810,8 @@ static void do_write_page(struct f2fs_sb_info *sbi, struct page *page,
 
        mutex_lock(&sit_i->sentry_lock);
        __refresh_next_blkoff(sbi, curseg);
-#ifdef CONFIG_F2FS_STAT_FS
-       sbi->block_count[curseg->alloc_type]++;
-#endif
+
+       stat_inc_block_count(sbi, curseg);
 
        /*
         * SIT information should be updated before segment allocation,
This page took 0.024618 seconds and 5 git commands to generate.