[3.13.y-ckt stable] Patch "mm: Remove false WARN_ON from pagecache_isize_extended()" has been added to staging queue

Kamal Mostafa kamal at canonical.com
Mon Dec 15 19:17:32 UTC 2014


This is a note to let you know that I have just added a patch titled

    mm: Remove false WARN_ON from pagecache_isize_extended()

to the linux-3.13.y-queue branch of the 3.13.y-ckt extended stable tree 
which can be found at:

 http://kernel.ubuntu.com/git?p=ubuntu/linux.git;a=shortlog;h=refs/heads/linux-3.13.y-queue

This patch is scheduled to be released in version 3.13.11-ckt13.

If you, or anyone else, feels it should not be added to this tree, please 
reply to this email.

For more information about the 3.13.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Kamal

------

>From 0e227d15802a808ed601180a0e9d7ab3ce352283 Mon Sep 17 00:00:00 2001
From: Jan Kara <jack at suse.cz>
Date: Thu, 30 Oct 2014 10:35:00 +1100
Subject: mm: Remove false WARN_ON from pagecache_isize_extended()

commit f55fefd1a5a339b1bd08c120b93312d6eb64a9fb upstream.

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 <jack at suse.cz>
Reviewed-by: Dave Chinner <dchinner at redhat.com>
Signed-off-by: Dave Chinner <david at fromorbit.com>
Buglink: http://bugs.launchpad.net/bugs/1402764
Cc: Stefan Bader <stefan.bader at canonical.com>
Cc: Andy Whitcroft <apw at canonical.com>
Signed-off-by: Kamal Mostafa <kamal at canonical.com>
---
 mm/truncate.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mm/truncate.c b/mm/truncate.c
index 855c38c..ac18edc 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -649,7 +649,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)
--
1.9.1





More information about the kernel-team mailing list