aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext3
diff options
context:
space:
mode:
authorChin-Tsung Cheng <chintzung@gmail.com>2014-08-15 03:49:31 -0400
committerJan Kara <jack@suse.cz>2014-08-19 17:16:51 -0400
commite6d8fb340f20bc5275ceed86133d1823dec9478d (patch)
tree5a06564fd90c57ec7731c7dab29e2ce9cc522379 /fs/ext3
parent410dd3cf4c9b36f27ed4542ee18b1af5e68645a4 (diff)
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>
Diffstat (limited to 'fs/ext3')
-rw-r--r--fs/ext3/super.c5
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)
2828 */ 2828 */
2829 overhead += ngroups * (2 + sbi->s_itb_per_group); 2829 overhead += ngroups * (2 + sbi->s_itb_per_group);
2830 2830
2831 /* Add the journal blocks as well */ 2831 /* Add the internal journal blocks as well */
2832 overhead += sbi->s_journal->j_maxlen; 2832 if (sbi->s_journal && !sbi->journal_bdev)
2833 overhead += sbi->s_journal->j_maxlen;
2833 2834
2834 sbi->s_overhead_last = overhead; 2835 sbi->s_overhead_last = overhead;
2835 smp_wmb(); 2836 smp_wmb();