[PATCH] mm: Remove false WARN_ON from pagecache_isize_extended()

From: Jan Kara
Date: Thu Oct 16 2014 - 06:58:42 EST


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@xxxxxxx>
---
mm/truncate.c | 1 -
1 file changed, 1 deletion(-)

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)
--
1.8.1.4


--IJpNTDwzlM2Ie8A6--
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/