lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190718012236.22618-1-cgxu519@zoho.com.cn>
Date:   Thu, 18 Jul 2019 09:22:36 +0800
From:   Chengguang Xu <cgxu519@...o.com.cn>
To:     jack@...e.com
Cc:     linux-ext4@...r.kernel.org, Chengguang Xu <cgxu519@...o.com.cn>
Subject: [PATCH] ext2: show more accurate free block count in debug message

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@...o.com.cn>
---
 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



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ