[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-Id: <1353585257-4415-2-git-send-email-clouds.yan@gmail.com>
Date: Thu, 22 Nov 2012 19:54:17 +0800
From: Yan Hong <clouds.yan@...il.com>
To: akpm@...ux-foundation.org
Cc: linux-kernel@...r.kernel.org
Subject: [PATCH 2/2] fs/buffer.c: remove redundant initialization in alloc_page_buffers()
buffer_head comes from kmem_cache_zalloc(), no need to zero
its field.
Signed-off-by: Yan Hong <clouds.yan@...il.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 majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists