summaryrefslogtreecommitdiffstats
path: root/fs/ext4/super.c
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 /fs/ext4/super.c
parentffb5387e85d528fb6d0d924abfa3fbf0fc484071 (diff)
downloadop-kernel-dev-b72f78cb63fb595af63fc781dced0a6fd354e572.zip
op-kernel-dev-b72f78cb63fb595af63fc781dced0a6fd354e572.tar.gz
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>
Diffstat (limited to 'fs/ext4/super.c')
-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 80928f7..1982d3c 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)
buf->f_type = EXT4_SUPER_MAGIC;
buf->f_bsize = sb->s_blocksize;
- buf->f_blocks = ext4_blocks_count(es) - EXT4_C2B(sbi, sbi->s_overhead);
+ buf->f_blocks = ext4_blocks_count(es) - EXT4_C2B(sbi, overhead);
bfree = percpu_counter_sum_positive(&sbi->s_freeclusters_counter) -
percpu_counter_sum_positive(&sbi->s_dirtyclusters_counter);
/* prevent underflow in case that few free space is available */
OpenPOWER on IntegriCloud