From 542c633d581836e222285f83ea955ad882485d7d Mon Sep 17 00:00:00 2001 From: Alex Tomas Date: Fri, 24 Mar 2006 03:16:16 -0800 Subject: [PATCH] --- yaml --- r: 23429 b: refs/heads/master c: 09fe316a7b10219be592118626850e1dfdfcc1aa h: refs/heads/master i: 23427: 926bb8247698793c7949d8c87cf8a4809a6d7c4c v: v3 --- [refs] | 2 +- trunk/fs/ext3/super.c | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/[refs] b/[refs] index 9c36b3e1e4c6..1cee359ae664 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: e933b6d6511dc80c63ab36fd584715371ae293c7 +refs/heads/master: 09fe316a7b10219be592118626850e1dfdfcc1aa diff --git a/trunk/fs/ext3/super.c b/trunk/fs/ext3/super.c index a3e2a8e7dca2..86e443182de4 100644 --- a/trunk/fs/ext3/super.c +++ b/trunk/fs/ext3/super.c @@ -2326,7 +2326,8 @@ static int ext3_remount (struct super_block * sb, int * flags, char * data) static int ext3_statfs (struct super_block * sb, struct kstatfs * buf) { - struct ext3_super_block *es = EXT3_SB(sb)->s_es; + struct ext3_sb_info *sbi = EXT3_SB(sb); + struct ext3_super_block *es = sbi->s_es; unsigned long overhead; int i; @@ -2368,12 +2369,12 @@ static int ext3_statfs (struct super_block * sb, struct kstatfs * buf) buf->f_type = EXT3_SUPER_MAGIC; buf->f_bsize = sb->s_blocksize; buf->f_blocks = le32_to_cpu(es->s_blocks_count) - overhead; - buf->f_bfree = ext3_count_free_blocks (sb); + buf->f_bfree = percpu_counter_sum(&sbi->s_freeblocks_counter); buf->f_bavail = buf->f_bfree - le32_to_cpu(es->s_r_blocks_count); if (buf->f_bfree < le32_to_cpu(es->s_r_blocks_count)) buf->f_bavail = 0; buf->f_files = le32_to_cpu(es->s_inodes_count); - buf->f_ffree = ext3_count_free_inodes (sb); + buf->f_ffree = percpu_counter_sum(&sbi->s_freeinodes_counter); buf->f_namelen = EXT3_NAME_LEN; return 0; }