Skip to content

Commit

Permalink
mm: Remove false WARN_ON from pagecache_isize_extended()
Browse files Browse the repository at this point in the history
commit f55fefd 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: Ben Hutchings <ben@decadent.org.uk>
  • Loading branch information
Jan Kara authored and Ben Hutchings committed Dec 14, 2014
1 parent b955a6a commit 9b0899a
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion mm/truncate.c
Original file line number Diff line number Diff line change
Expand Up @@ -608,7 +608,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)
Expand Down

0 comments on commit 9b0899a

Please sign in to comment.