mm: Remove false WARN_ON from pagecache_isize_extended()
authorJan Kara <jack@suse.cz>
Wed, 29 Oct 2014 23:35:00 +0000 (10:35 +1100)
committerDave Chinner <david@fromorbit.com>
Wed, 29 Oct 2014 23:35:00 +0000 (10:35 +1100)
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@suse.cz>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
mm/truncate.c

index 261eaf6..c646084 100644 (file)
@@ -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)