diff options
author | Chin-Tsung Cheng <chintzung@gmail.com> | 2014-08-15 09:49:31 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2014-08-19 23:16:51 +0200 |
commit | e6d8fb340f20bc5275ceed86133d1823dec9478d (patch) | |
tree | 5a06564fd90c57ec7731c7dab29e2ce9cc522379 | |
parent | isofs: Fix unbounded recursion when processing relocated directories (diff) | |
download | linux-e6d8fb340f20bc5275ceed86133d1823dec9478d.tar.xz linux-e6d8fb340f20bc5275ceed86133d1823dec9478d.zip |
ext3: Count internal journal as bsddf overhead in ext3_statfs
The journal blocks of external journal device should not
be counted as overhead.
Signed-off-by: Chin-Tsung Cheng <chintzung@gmail.com>
Signed-off-by: Jan Kara <jack@suse.cz>
-rw-r--r-- | fs/ext3/super.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/fs/ext3/super.c b/fs/ext3/super.c index 08cdfe5461e3..622e88249024 100644 --- a/fs/ext3/super.c +++ b/fs/ext3/super.c @@ -2828,8 +2828,9 @@ static int ext3_statfs (struct dentry * dentry, struct kstatfs * buf) */ overhead += ngroups * (2 + sbi->s_itb_per_group); - /* Add the journal blocks as well */ - overhead += sbi->s_journal->j_maxlen; + /* Add the internal journal blocks as well */ + if (sbi->s_journal && !sbi->journal_bdev) + overhead += sbi->s_journal->j_maxlen; sbi->s_overhead_last = overhead; smp_wmb(); |