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
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 <[email protected]>
Reviewed-by: Dave Chinner <[email protected]>
Signed-off-by: Dave Chinner <[email protected]>
  • Loading branch information
jankara authored and dchinner committed Oct 29, 2014
1 parent 7a19dee commit f55fefd
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 @@ -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)
Expand Down

0 comments on commit f55fefd

Please sign in to comment.