aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ubifs/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ubifs/super.c')
-rw-r--r--fs/ubifs/super.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fs/ubifs/super.c b/fs/ubifs/super.c
index be23fd3cfd84..1207bd51eadd 100644
--- a/fs/ubifs/super.c
+++ b/fs/ubifs/super.c
@@ -371,7 +371,7 @@ static int ubifs_statfs(struct dentry *dentry, struct kstatfs *buf)
371 struct ubifs_info *c = dentry->d_sb->s_fs_info; 371 struct ubifs_info *c = dentry->d_sb->s_fs_info;
372 unsigned long long free; 372 unsigned long long free;
373 373
374 free = ubifs_budg_get_free_space(c); 374 free = ubifs_get_free_space(c);
375 dbg_gen("free space %lld bytes (%lld blocks)", 375 dbg_gen("free space %lld bytes (%lld blocks)",
376 free, free >> UBIFS_BLOCK_SHIFT); 376 free, free >> UBIFS_BLOCK_SHIFT);
377 377
@@ -653,11 +653,11 @@ static int init_constants_late(struct ubifs_info *c)
653 * internally because it does not make much sense for UBIFS, but it is 653 * internally because it does not make much sense for UBIFS, but it is
654 * necessary to report something for the 'statfs()' call. 654 * necessary to report something for the 'statfs()' call.
655 * 655 *
656 * Subtract the LEB reserved for GC and the LEB which is reserved for 656 * Subtract the LEB reserved for GC, the LEB which is reserved for
657 * deletions. 657 * deletions, and assume only one journal head is available.
658 */ 658 */
659 tmp64 = c->main_lebs - 2; 659 tmp64 = c->main_lebs - 2 - c->jhead_cnt + 1;
660 tmp64 *= (uint64_t)c->leb_size - c->dark_wm; 660 tmp64 *= (uint64_t)c->leb_size - c->leb_overhead;
661 tmp64 = ubifs_reported_space(c, tmp64); 661 tmp64 = ubifs_reported_space(c, tmp64);
662 c->block_cnt = tmp64 >> UBIFS_BLOCK_SHIFT; 662 c->block_cnt = tmp64 >> UBIFS_BLOCK_SHIFT;
663 663