mm: Fix comment before truncate_setsize()
Subsystems (3)
Jan Kara
maintainerPATCH 1/1 mm: Fix comment before truncate_setsize()
XFS doesn't always hold i_mutex when calling truncate_setsize() and it uses a different lock to serialize truncates and writes. So fix the comment before truncate_setsize().
Reported-by Jan Beulich <[email protected]>
Signed-off-by Jan Kara <[email protected]>
--- mm/truncate.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
mm/truncate.c +3 -2
@@ -715,8 +715,9 @@ EXPORT_SYMBOL(truncate_pagecache);* necessary) to @newsize. It will be typically be called from the filesystem's * setattr function when ATTR_SIZE is passed in. * -* Must be called with inode_mutex held and before all filesystem specific -* block truncation has been performed. +* Must be called with a lock serializing truncates and writes (generally +* i_mutex but e.g. xfs uses a different lock) and before all filesystem +* specific block truncation has been performed. */ void truncate_setsize (struct inode *inode,loff_t newsize) {
Signature · 7 lines
1.8.1.4 -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>
Quoted 6 lines · Jan Kara
XFS doesn't always hold
i_mutexwhen callingtruncate_setsize()and it uses a different lock to serialize truncates and writes. So fix the comment beforetruncate_setsize().Reported-by Jan Beulich <[email protected]>Signed-off-by Jan Kara <[email protected]>
I'll pull this into the xfs tree with the other fix. SHould go to linus tomorrow morning now that I've got all the XFS issues that were holding it up sorted out.
Cheers,
Dave.
Signature · 8 lines
Dave Chinner [email protected] -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"[email protected]"> [email protected] </a>