[PATCH 2/2] CacheFiles: Slightly optimize 'cachefiles_has_space()'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxx>
---
 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




[Index of Archives]     [Kernel Development]     [Kernel Announce]     [Kernel Newbies]     [Linux Networking Development]     [Share Photos]     [IDE]     [Security]     [Git]     [Netfilter]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Device Mapper]

  Powered by Linux