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>] [day] [month] [year] [list]
Message-Id: <1513765018-15439-1-git-send-email-fxinrong@gmail.com>
Date:   Wed, 20 Dec 2017 18:16:58 +0800
From:   Sean Fu <fxinrong@...il.com>
To:     viro@...iv.linux.org.uk
Cc:     linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org,
        Sean Fu <fxinrong@...il.com>
Subject: [PATCH] fs: buffer: Remove unnecessary initialisation for bh->b_state.

The memory is allocated by kmem_cache_zalloc and initialized with zero.
The bh->b_state initialisation is unnecessary in nobh_write_begin.

Signed-off-by: Sean Fu <fxinrong@...il.com>
---
 fs/buffer.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/fs/buffer.c b/fs/buffer.c
index 0736a6a..e9a1861 100644
--- a/fs/buffer.c
+++ b/fs/buffer.c
@@ -2618,7 +2618,6 @@ int nobh_write_begin(struct address_space *mapping,
 		int create;
 
 		block_end = block_start + blocksize;
-		bh->b_state = 0;
 		create = 1;
 		if (block_start >= to)
 			create = 0;
-- 
2.6.2

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ