diff options
-rw-r--r-- | fs/ext3/super.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index a3e2a8e7dca2..86e443182de4 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c | |||
@@ -2326,7 +2326,8 @@ restore_opts: | |||
2326 | 2326 | ||
2327 | static int ext3_statfs (struct super_block * sb, struct kstatfs * buf) | 2327 | static int ext3_statfs (struct super_block * sb, struct kstatfs * buf) |
2328 | { | 2328 | { |
2329 | struct ext3_super_block *es = EXT3_SB(sb)->s_es; | 2329 | struct ext3_sb_info *sbi = EXT3_SB(sb); |
2330 | struct ext3_super_block *es = sbi->s_es; | ||
2330 | unsigned long overhead; | 2331 | unsigned long overhead; |
2331 | int i; | 2332 | int i; |
2332 | 2333 | ||
@@ -2368,12 +2369,12 @@ static int ext3_statfs (struct super_block * sb, struct kstatfs * buf) | |||
2368 | buf->f_type = EXT3_SUPER_MAGIC; | 2369 | buf->f_type = EXT3_SUPER_MAGIC; |
2369 | buf->f_bsize = sb->s_blocksize; | 2370 | buf->f_bsize = sb->s_blocksize; |
2370 | buf->f_blocks = le32_to_cpu(es->s_blocks_count) - overhead; | 2371 | buf->f_blocks = le32_to_cpu(es->s_blocks_count) - overhead; |
2371 | buf->f_bfree = ext3_count_free_blocks (sb); | 2372 | buf->f_bfree = percpu_counter_sum(&sbi->s_freeblocks_counter); |
2372 | buf->f_bavail = buf->f_bfree - le32_to_cpu(es->s_r_blocks_count); | 2373 | buf->f_bavail = buf->f_bfree - le32_to_cpu(es->s_r_blocks_count); |
2373 | if (buf->f_bfree < le32_to_cpu(es->s_r_blocks_count)) | 2374 | if (buf->f_bfree < le32_to_cpu(es->s_r_blocks_count)) |
2374 | buf->f_bavail = 0; | 2375 | buf->f_bavail = 0; |
2375 | buf->f_files = le32_to_cpu(es->s_inodes_count); | 2376 | buf->f_files = le32_to_cpu(es->s_inodes_count); |
2376 | buf->f_ffree = ext3_count_free_inodes (sb); | 2377 | buf->f_ffree = percpu_counter_sum(&sbi->s_freeinodes_counter); |
2377 | buf->f_namelen = EXT3_NAME_LEN; | 2378 | buf->f_namelen = EXT3_NAME_LEN; |
2378 | return 0; | 2379 | return 0; |
2379 | } | 2380 | } |