From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dave Chinner Subject: Re: [PATCH RESEND] mm: Remove false WARN_ON from pagecache_isize_extended() Date: Wed, 29 Oct 2014 08:26:39 +1100 Message-ID: <20141028212639.GD16186@dastard> References: <1414403885-16219-1-git-send-email-jack@suse.cz> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: Ted Tso , linux-fsdevel@vger.kernel.org To: Jan Kara Return-path: Received: from ipmail06.adl6.internode.on.net ([150.101.137.145]:20207 "EHLO ipmail06.adl6.internode.on.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753485AbaJ1V0n (ORCPT ); Tue, 28 Oct 2014 17:26:43 -0400 Content-Disposition: inline In-Reply-To: <1414403885-16219-1-git-send-email-jack@suse.cz> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: On Mon, Oct 27, 2014 at 10:58:05AM +0100, Jan Kara wrote: > The WARN_ON checking whether i_mutex is held in > pagecache_isize_extended() was wrong because some filesystems (e.g. > XFS) use different locks for serialization of truncates / writes. So > just remove the check. > > Signed-off-by: Jan Kara > --- > mm/truncate.c | 1 - > 1 file changed, 1 deletion(-) > > Ted can you please merge this patch? I originally sent this patch in a > reply to Fengguangs report and apparently you missed it. Thanks! > > diff --git a/mm/truncate.c b/mm/truncate.c > index 261eaf6e5a19..c646084e5eec 100644 > --- a/mm/truncate.c > +++ b/mm/truncate.c > @@ -755,7 +755,6 @@ void pagecache_isize_extended(struct inode *inode, loff_t from, loff_t to) > struct page *page; > pgoff_t index; > > - WARN_ON(!mutex_is_locked(&inode->i_mutex)); > WARN_ON(to > inode->i_size); > > if (from >= to || bsize == PAGE_CACHE_SIZE) Jan, I'm going to pull this through the XFS tree seeing as nobody else seems to care about it. Should be upstream by the end of the week. Cheers, Dave. -- Dave Chinner david@fromorbit.com