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>
This commit is contained in:
Chin-Tsung Cheng 2014-08-15 15:49:31 +08:00 committed by Jan Kara
parent 410dd3cf4c
commit e6d8fb340f
1 changed files with 3 additions and 2 deletions

View File

@ -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();