Skip to content

Commit

Permalink
mm: fix truncate_setsize() comment
Browse files Browse the repository at this point in the history
Contrary to what the comment says, truncate_setsize() should be called
*before* filesystem truncated blocks.

Signed-off-by: Jan Kara <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Cc: Al Viro <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
jankara authored and torvalds committed Jan 21, 2011
1 parent 987eba6 commit 382e27d
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions mm/truncate.c
Original file line number Diff line number Diff line change
Expand Up @@ -549,13 +549,12 @@ EXPORT_SYMBOL(truncate_pagecache);
* @inode: inode
* @newsize: new file size
*
* truncate_setsize updastes i_size update and performs pagecache
* truncation (if necessary) for a file size updates. It will be
* typically be called from the filesystem's setattr function when
* ATTR_SIZE is passed in.
* truncate_setsize updates i_size and performs pagecache truncation (if
* 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 after all filesystem
* specific block truncation has been performed.
* Must be called with inode_mutex held and before all filesystem specific
* block truncation has been performed.
*/
void truncate_setsize(struct inode *inode, loff_t newsize)
{
Expand Down

0 comments on commit 382e27d

Please sign in to comment.