Skip to content

Commit e6d8fb3

Browse files
Chin-Tsung Chengjankara
authored andcommitted
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>
1 parent 410dd3c commit e6d8fb3

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎fs/ext3/super.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2828,8 +2828,9 @@ static int ext3_statfs (struct dentry * dentry, struct kstatfs * buf)
28282828
*/
28292829
overhead += ngroups * (2 + sbi->s_itb_per_group);
28302830

2831-
/* Add the journal blocks as well */
2832-
overhead += sbi->s_journal->j_maxlen;
2831+
/* Add the internal journal blocks as well */
2832+
if (sbi->s_journal && !sbi->journal_bdev)
2833+
overhead += sbi->s_journal->j_maxlen;
28332834

28342835
sbi->s_overhead_last = overhead;
28352836
smp_wmb();

0 commit comments

Comments
 (0)