aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2012-11-08 10:33:36 -0500
committerTheodore Ts'o <tytso@mit.edu>2012-11-08 10:33:36 -0500
commitb72f78cb63fb595af63fc781dced0a6fd354e572 (patch)
tree2ec6d7aee78d222b82adaa336cf7b6301efff194
parentffb5387e85d528fb6d0d924abfa3fbf0fc484071 (diff)
ext4: fix overhead calculations in ext4_stats, again
"overhead" was a write-only variable in this function after commit 952fc18e; we set it to 0 for minixdf, or to sbi->s_overhead if !minixdf, but never read it again after that. We need to use it, not sbi->s_overhead, when subtracting out overhead for f_blocks, or we get the wrong answer for minixdf. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
-rw-r--r--fs/ext4/super.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/super.c b/fs/ext4/super.c
index 80928f716850..1982d3cd9139 100644
--- a/fs/ext4/super.c
+++ b/fs/ext4/super.c
@@ -4790,7 +4790,7 @@ static int ext4_statfs(struct dentry *dentry, struct kstatfs *buf)
4790 4790
4791 buf->f_type = EXT4_SUPER_MAGIC; 4791 buf->f_type = EXT4_SUPER_MAGIC;
4792 buf->f_bsize = sb->s_blocksize; 4792 buf->f_bsize = sb->s_blocksize;
4793 buf->f_blocks = ext4_blocks_count(es) - EXT4_C2B(sbi, sbi->s_overhead); 4793 buf->f_blocks = ext4_blocks_count(es) - EXT4_C2B(sbi, overhead);
4794 bfree = percpu_counter_sum_positive(&sbi->s_freeclusters_counter) - 4794 bfree = percpu_counter_sum_positive(&sbi->s_freeclusters_counter) -
4795 percpu_counter_sum_positive(&sbi->s_dirtyclusters_counter); 4795 percpu_counter_sum_positive(&sbi->s_dirtyclusters_counter);
4796 /* prevent underflow in case that few free space is available */ 4796 /* prevent underflow in case that few free space is available */