linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm: Fix comment at truncate_setsize()
@ 2010-10-21  9:47 Jan Kara
  2010-10-21  9:53 ` Christoph Hellwig
  2010-10-21 11:48 ` Al Viro
  0 siblings, 2 replies; 5+ messages in thread
From: Jan Kara @ 2010-10-21  9:47 UTC (permalink / raw)
  To: linux-fsdevel; +Cc: Alexander Viro, Jan Kara, Christoph Hellwig

The main fix in this patch is that truncate_setsize() should be called
*before* not after filesystem truncated blocks.

CC: Christoph Hellwig <hch@infradead.org>
Signed-off-by: Jan Kara <jack@suse.cz>
---
 mm/truncate.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

diff --git a/mm/truncate.c b/mm/truncate.c
index ba887bf..e13e535 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -545,13 +545,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)
 {
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread
* [PATCH] mm: Fix comment at truncate_setsize()
@ 2011-01-12 18:21 Jan Kara
  0 siblings, 0 replies; 5+ messages in thread
From: Jan Kara @ 2011-01-12 18:21 UTC (permalink / raw)
  To: Andrew Morton; +Cc: linux-fsdevel, Jan Kara, Christoph Hellwig, Al Viro

The main fix in this patch is that, contrary to what the comment says,
truncate_setsize() should be called *before* filesystem truncated blocks.

CC: Christoph Hellwig <hch@infradead.org>
CC: Al Viro <viro@ZenIV.linux.org.uk>
Signed-off-by: Jan Kara <jack@suse.cz>
---
 mm/truncate.c |   11 +++++------
 1 files changed, 5 insertions(+), 6 deletions(-)

 Andrew, could you merge this patch please? Thanks.

diff --git a/mm/truncate.c b/mm/truncate.c
index ba887bf..e13e535 100644
--- a/mm/truncate.c
+++ b/mm/truncate.c
@@ -545,13 +545,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)
 {
-- 
1.6.4.2


^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-01-12 18:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-10-21  9:47 [PATCH] mm: Fix comment at truncate_setsize() Jan Kara
2010-10-21  9:53 ` Christoph Hellwig
2010-10-21 11:48 ` Al Viro
2010-10-21 15:30   ` Jan Kara
  -- strict thread matches above, loose matches on Subject: below --
2011-01-12 18:21 Jan Kara

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).