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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <92718c86a836f0d730a96b11cfc94b85edf32c19.1637432444.git.christophe.jaillet@wanadoo.fr>
Date:   Sat, 20 Nov 2021 19:22:42 +0100
From:   Christophe JAILLET <christophe.jaillet@...adoo.fr>
To:     dhowells@...hat.com
Cc:     linux-cachefs@...hat.com, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org,
        Christophe JAILLET <christophe.jaillet@...adoo.fr>
Subject: [PATCH 2/2] CacheFiles: Slightly optimize 'cachefiles_has_space()'

There is no need to clear the 'struct kstatfs' buffer when calling
'vfs_statfs()', it is already be done in 'statfs_by_dentry()'. So a few
cycles can be saved here.

Signed-off-by: Christophe JAILLET <christophe.jaillet@...adoo.fr>
---
 fs/cachefiles/daemon.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/fs/cachefiles/daemon.c b/fs/cachefiles/daemon.c
index be8f2ec453b6..45bfc5643615 100644
--- a/fs/cachefiles/daemon.c
+++ b/fs/cachefiles/daemon.c
@@ -688,8 +688,6 @@ int cachefiles_has_space(struct cachefiles_cache *cache,
 	//       fnr, bnr);
 
 	/* find out how many pages of blockdev are available */
-	memset(&stats, 0, sizeof(stats));
-
 	ret = vfs_statfs(&path, &stats);
 	if (ret < 0) {
 		if (ret == -EIO)
-- 
2.30.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ