buffer_head comes from kmem_cache_zalloc(), no need to zero its field. Signed-off-by: Yan Hong <clouds....@gmail.com> ---
init_buffer() can be actually removed too, but I'm afraid someday its semantic will beyond initializing ->b_end_io and ->b_private. fs/buffer.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/fs/buffer.c b/fs/buffer.c index 69e83ee..ad87aa6 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -849,13 +849,10 @@ try_again: if (!bh) goto no_grow; - bh->b_bdev = NULL; bh->b_this_page = head; bh->b_blocknr = -1; head = bh; - bh->b_state = 0; - atomic_set(&bh->b_count, 0); bh->b_size = size; /* Link the buffer to its page */ -- 1.7.9.5 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/