Skip to contentSkip to conversation

fs: buffer: Remove unnecessary initialisation for bh->b_state.

PATCH New Sean Fu 1 participant 1 message Dec 20, 2017 VFS

lore
Share & tools
lore

Sean Fu

author
#0 lore raw

PATCH 1/1 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.

---
 fs/buffer.c | 1 -
 1 file changed, 1 deletion(-)
fs/buffer.c +0 -1
index 0736a6a..e9a1861 100644
@@ -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;
Signature · 1 line
2.6.2