diff options
Diffstat (limited to 'mm/truncate.c')
-rw-r--r-- | mm/truncate.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/truncate.c b/mm/truncate.c index 261eaf6e5a19..f1e4d6052369 100644 --- a/mm/truncate.c +++ b/mm/truncate.c | |||
@@ -715,8 +715,9 @@ EXPORT_SYMBOL(truncate_pagecache); | |||
715 | * necessary) to @newsize. It will be typically be called from the filesystem's | 715 | * necessary) to @newsize. It will be typically be called from the filesystem's |
716 | * setattr function when ATTR_SIZE is passed in. | 716 | * setattr function when ATTR_SIZE is passed in. |
717 | * | 717 | * |
718 | * Must be called with inode_mutex held and before all filesystem specific | 718 | * Must be called with a lock serializing truncates and writes (generally |
719 | * block truncation has been performed. | 719 | * i_mutex but e.g. xfs uses a different lock) and before all filesystem |
720 | * specific block truncation has been performed. | ||
720 | */ | 721 | */ |
721 | void truncate_setsize(struct inode *inode, loff_t newsize) | 722 | void truncate_setsize(struct inode *inode, loff_t newsize) |
722 | { | 723 | { |
@@ -755,7 +756,6 @@ void pagecache_isize_extended(struct inode *inode, loff_t from, loff_t to) | |||
755 | struct page *page; | 756 | struct page *page; |
756 | pgoff_t index; | 757 | pgoff_t index; |
757 | 758 | ||
758 | WARN_ON(!mutex_is_locked(&inode->i_mutex)); | ||
759 | WARN_ON(to > inode->i_size); | 759 | WARN_ON(to > inode->i_size); |
760 | 760 | ||
761 | if (from >= to || bsize == PAGE_CACHE_SIZE) | 761 | if (from >= to || bsize == PAGE_CACHE_SIZE) |