mm: Remove false WARN_ON from pagecache_isize_extended()
Subsystems (3)
Jan Kara
maintainerPATCH RESEND 1/1 mm: Remove false WARN_ON from pagecache_isize_extended()
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.
--- mm/truncate.c | 1 - 1 file changed, 1 deletion(-)
Ted can you please merge this patch? I originally sent this patch in a
reply to Fengguangs report and apparently you missed it. Thanks!
mm/truncate.c +0 -1
@@ -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 )
Signature · 1 line
1.8.1.4
Quoted 18 lines · Jan Kara
The
WARN_ONchecking whetheri_mutexis held inpagecache_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]>--- mm/truncate.c | 1 - 1 file changed, 1 deletion(-)Ted can you please merge this patch? I originally sent this patch in a
reply to Fengguangs report and apparently you missed it. Thanks!mm/truncate.c +0
-0
mm/truncate.c void pagecache_isize_extended(struct inode *inode, loff_t from, loff_t to) · line 760
Quoted 7 lines
mm/truncate.c +0
-1@@ -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 )
Jan, I'm going to pull this through the XFS tree seeing as nobody else seems to care about it. Should be upstream by the end of the week.
Cheers,
Dave.
Signature · 2 lines
Dave Chinner [email protected]