Show more accurate free block count in debug message by replacing es->s_free_blocks_count to sbi->s_freeblocks_counter in ext2_count_free_blocks(). Signed-off-by: Chengguang Xu <cgxu519@xxxxxxxxxxx> --- fs/ext2/balloc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/ext2/balloc.c b/fs/ext2/balloc.c index 547c165299c0..8c587533cead 100644 --- a/fs/ext2/balloc.c +++ b/fs/ext2/balloc.c @@ -1495,7 +1495,8 @@ unsigned long ext2_count_free_blocks (struct super_block * sb) brelse(bitmap_bh); } printk("ext2_count_free_blocks: stored = %lu, computed = %lu, %lu\n", - (long)le32_to_cpu(es->s_free_blocks_count), + (unsigned long) + percpu_counter_read(&EXT2_SB(sb)->s_freeblocks_counter), desc_count, bitmap_count); return bitmap_count; #else -- 2.21.0