diff options
Diffstat (limited to 'fs/ext4')
-rw-r--r-- | fs/ext4/super.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c index 9ce3b67b7269..c9e06c647ce8 100644 --- a/fs/ext4/super.c +++ b/fs/ext4/super.c | |||
@@ -3964,9 +3964,12 @@ static int ext4_commit_super(struct super_block *sb, int sync) | |||
3964 | else | 3964 | else |
3965 | es->s_kbytes_written = | 3965 | es->s_kbytes_written = |
3966 | cpu_to_le64(EXT4_SB(sb)->s_kbytes_written); | 3966 | cpu_to_le64(EXT4_SB(sb)->s_kbytes_written); |
3967 | ext4_free_blocks_count_set(es, percpu_counter_sum_positive( | 3967 | if (percpu_counter_initialized(&EXT4_SB(sb)->s_freeblocks_counter)) |
3968 | ext4_free_blocks_count_set(es, percpu_counter_sum_positive( | ||
3968 | &EXT4_SB(sb)->s_freeblocks_counter)); | 3969 | &EXT4_SB(sb)->s_freeblocks_counter)); |
3969 | es->s_free_inodes_count = cpu_to_le32(percpu_counter_sum_positive( | 3970 | if (percpu_counter_initialized(&EXT4_SB(sb)->s_freeinodes_counter)) |
3971 | es->s_free_inodes_count = | ||
3972 | cpu_to_le32(percpu_counter_sum_positive( | ||
3970 | &EXT4_SB(sb)->s_freeinodes_counter)); | 3973 | &EXT4_SB(sb)->s_freeinodes_counter)); |
3971 | sb->s_dirt = 0; | 3974 | sb->s_dirt = 0; |
3972 | BUFFER_TRACE(sbh, "marking dirty"); | 3975 | BUFFER_TRACE(sbh, "marking dirty"); |