Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932223AbdLTKRf (ORCPT ); Wed, 20 Dec 2017 05:17:35 -0500 Received: from mail-pl0-f68.google.com ([209.85.160.68]:43577 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754235AbdLTKR3 (ORCPT ); Wed, 20 Dec 2017 05:17:29 -0500 X-Google-Smtp-Source: ACJfBosofKR0XxyAtn9SfnCUPLqvqdOzfk9U83bBmH4gaiIzXv8hjJ49saXG4SZZa/MnEhReicC68Q== From: Sean Fu To: viro@zeniv.linux.org.uk Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, Sean Fu Subject: [PATCH] fs: buffer: Remove unnecessary initialisation for bh->b_state. Date: Wed, 20 Dec 2017 18:16:58 +0800 Message-Id: <1513765018-15439-1-git-send-email-fxinrong@gmail.com> X-Mailer: git-send-email 2.6.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 562 Lines: 22 The memory is allocated by kmem_cache_zalloc and initialized with zero. The bh->b_state initialisation is unnecessary in nobh_write_begin. Signed-off-by: Sean Fu --- fs/buffer.c | 1 - 1 file changed, 1 deletion(-) diff --git a/fs/buffer.c b/fs/buffer.c index 0736a6a..e9a1861 100644 --- a/fs/buffer.c +++ b/fs/buffer.c @@ -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; -- 2.6.2