Skip to content

Commit 02c0ab6

Browse files
clouds-yantorvalds
authored andcommitted
fs/buffer.c: remove redundant initialization in alloc_page_buffers()
buffer_head comes from kmem_cache_zalloc(), no need to zero its fields. Signed-off-by: Yan Hong <clouds.yan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent a3f3c29 commit 02c0ab6

1 file changed

Lines changed: 0 additions & 3 deletions

File tree

‎fs/buffer.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -849,13 +849,10 @@ struct buffer_head *alloc_page_buffers(struct page *page, unsigned long size,
849849
if (!bh)
850850
goto no_grow;
851851

852-
bh->b_bdev = NULL;
853852
bh->b_this_page = head;
854853
bh->b_blocknr = -1;
855854
head = bh;
856855

857-
bh->b_state = 0;
858-
atomic_set(&bh->b_count, 0);
859856
bh->b_size = size;
860857

861858
/* Link the buffer to its page */

0 commit comments

Comments
 (0)