]> git.hungrycats.org Git - linux/commitdiff
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)
committerJiri Slaby <jslaby@suse.cz>
Thu, 13 Nov 2014 18:03:02 +0000 (19:03 +0100)
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@suse.cz>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
mm/truncate.c

index 7dfb7c70fd4b66caac11f3ea94a6b62087a97ebd..827ad8d2b5cd8c4fca0122d9662f191c4f38f5ce 100644 (file)
@@ -697,7 +697,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)