From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?ISO-8859-15?Q?Luk=E1=A8_Czerner?= Subject: Re: [RFC 1/1] vfs: del redundant BH_new flag on unrelated buffer heads. Date: Mon, 23 Jun 2014 11:08:31 +0200 (CEST) Message-ID: References: <1401969309-3734-1-git-send-email-chishanmingshen@gmail.com> Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Cc: Alexander Viro , linux-fsdevel@vger.kernel.org To: chishanmingshen Return-path: Received: from mx1.redhat.com ([209.132.183.28]:37195 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753198AbaFWJIg (ORCPT ); Mon, 23 Jun 2014 05:08:36 -0400 In-Reply-To: <1401969309-3734-1-git-send-email-chishanmingshen@gmail.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, 5 Jun 2014, chishanmingshen wrote: > Date: Thu, 5 Jun 2014 19:55:09 +0800 > From: chishanmingshen > To: Alexander Viro > Cc: linux-fsdevel@vger.kernel.org, chishanmingshen > Subject: [RFC 1/1] vfs: del redundant BH_new flag on unrelated buffer heads. > > Just skip the unrelated buffer heads when clear buffer head's BH_new flag. I can see that from the code, but can you explain why in the commit description ? Thanks! -Lukas > This patch is *untested*. > > Signed-off-by: chishanmingshen > --- > fs/buffer.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/fs/buffer.c b/fs/buffer.c > index 9ddb9fc..a28a1a1 100644 > --- a/fs/buffer.c > +++ b/fs/buffer.c > @@ -1987,8 +1987,8 @@ static int __block_commit_write(struct inode *inode, struct page *page, > } else { > set_buffer_uptodate(bh); > mark_buffer_dirty(bh); > + clear_buffer_new(bh); > } > - clear_buffer_new(bh); > > block_start = block_end; > bh = bh->b_this_page; >