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

Luis Henriques luis.henriques at canonical.com
Mon Nov 10 11:34:10 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.16.y-queue branch of the 3.16.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.16.y-queue

This patch is scheduled to be released in version 3.16.7-ckt1.

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.16.y-ckt tree, see
https://wiki.ubuntu.com/Kernel/Dev/ExtendedStable

Thanks.
-Luis

------

>From c8ec5f10cec1c46afe1cc7ca55c024164952d834 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>
Signed-off-by: Luis Henriques <luis.henriques at canonical.com>
---
 mm/truncate.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/mm/truncate.c b/mm/truncate.c
index ed6e91a695e0..699494e6aba5 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -764,7 +764,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)
--
2.1.0





More information about the kernel-team mailing list