mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] fs: buffer: Remove unnecessary initialisation for bh->b_state.
@ 2017-12-20 10:16 Sean Fu
  0 siblings, 0 replies; only message in thread
From: Sean Fu @ 2017-12-20 10:16 UTC (permalink / raw)
  To: viro; +Cc: linux-fsdevel, linux-kernel, Sean Fu

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@gmail.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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2017-12-20 10:17 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-12-20 10:16 [PATCH] fs: buffer: Remove unnecessary initialisation for bh->b_state Sean Fu

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®