From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga07.intel.com ([134.134.136.100]:43852 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751030AbdG0SD4 (ORCPT ); Thu, 27 Jul 2017 14:03:56 -0400 Date: Thu, 27 Jul 2017 12:03:55 -0600 From: Ross Zwisler To: "Kani, Toshimitsu" Cc: "hirofumi@mail.parknet.co.jp" , "willy@infradead.org" , "ross.zwisler@linux.intel.com" , "linux-nvdimm@lists.01.org" , "jthumshirn@suse.de" , "linux-fsdevel@vger.kernel.org" Subject: Re: FIle copy to FAT FS on NVDIMM hits BUG_ON at fs/buffer.c:3305! Message-ID: <20170727180355.GB26633@linux.intel.com> References: <1501018096.2042.70.camel@hpe.com> <20170725222247.GA26391@linux.intel.com> <20170726082159.GE4039@linux-x5ow.site> <87d18neemb.fsf@devron> <20170726171101.GA15980@bombadil.infradead.org> <1501171371.2042.83.camel@hpe.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1501171371.2042.83.camel@hpe.com> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Thu, Jul 27, 2017 at 04:12:18PM +0000, Kani, Toshimitsu wrote: > On Wed, 2017-07-26 at 10:11 -0700, Matthew Wilcox wrote: > > On Wed, Jul 26, 2017 at 06:23:08PM +0900, OGAWA Hirofumi wrote: > > > The locking of this path seems to be broken. The guy familiar to > > > bdev_write_page() path will made real fix though, The following > > > patch should be explaining enough what is wrong. > > > > > > In short, clean_buffers() must be called before unlocking > > > lock_page(). > > > > Thanks for that.��This should fix the problem while not leaking the > > unlock_page call outside bdev_write_page. > > > > --- 8< --- > > > > Signed-off-by: Matthew Wilcox > > Thanks Willy and Hirofumi for the quick fix! I've tested the change, > and it works fine. > > Tested-by: Toshi Kani > > Out of curiosity, I am still wondering about the following:� > - Why is this issue exposed with FAT FS, but not with other FSs? > - Why did I not see this issue with BTT? I also didn't see it with FAT + BRD, so I think the answer to both of the above is just that the timings were different.