]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
fs/buffer.c: remove redundant initialization in alloc_page_buffers()
authorYan Hong <clouds.yan@gmail.com>
Thu, 29 Nov 2012 03:18:12 +0000 (14:18 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 5 Dec 2012 05:23:23 +0000 (16:23 +1100)
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>
fs/buffer.c

index 2ae630a9a4ca7ed76c87aa143120d87747006d52..70ed4d8c023beeebd948dea1dbe8c8577f7dd99c 100644 (file)
@@ -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 */