* [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
* [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
* Re: [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
1 sibling, 0 replies; 5+ messages in thread
From: Christoph Hellwig @ 2010-10-21 9:53 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-fsdevel, Alexander Viro, Christoph Hellwig
On Thu, Oct 21, 2010 at 11:47:22AM +0200, Jan Kara wrote:
> 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>
Looks good.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [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
2010-10-21 15:30 ` Jan Kara
1 sibling, 1 reply; 5+ messages in thread
From: Al Viro @ 2010-10-21 11:48 UTC (permalink / raw)
To: Jan Kara; +Cc: linux-fsdevel, Christoph Hellwig
On Thu, Oct 21, 2010 at 11:47:22AM +0200, Jan Kara wrote:
> The main fix in this patch is that truncate_setsize() should be called
> *before* not after filesystem truncated blocks.
ITYM "contrary to what comment says, ..."; as it is, commit message alone
reads as if commit fixed the problem with actual code.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] mm: Fix comment at truncate_setsize()
2010-10-21 11:48 ` Al Viro
@ 2010-10-21 15:30 ` Jan Kara
0 siblings, 0 replies; 5+ messages in thread
From: Jan Kara @ 2010-10-21 15:30 UTC (permalink / raw)
To: Al Viro; +Cc: Jan Kara, linux-fsdevel, Christoph Hellwig
[-- Attachment #1: Type: text/plain, Size: 445 bytes --]
On Thu 21-10-10 12:48:12, Al Viro wrote:
> On Thu, Oct 21, 2010 at 11:47:22AM +0200, Jan Kara wrote:
> > The main fix in this patch is that truncate_setsize() should be called
> > *before* not after filesystem truncated blocks.
>
> ITYM "contrary to what comment says, ..."; as it is, commit message alone
> reads as if commit fixed the problem with actual code.
OK. Attached is a version with updated changelog. Is it better?
Honza
[-- Attachment #2: 0001-mm-Fix-comment-at-truncate_setsize.patch --]
[-- Type: text/x-patch, Size: 1484 bytes --]
>From f237e25cae0b628fc81e4fa69b3b2a2ab2d0b086 Mon Sep 17 00:00:00 2001
From: Jan Kara <jack@suse.cz>
Date: Thu, 21 Oct 2010 11:29:09 +0200
Subject: [PATCH] mm: Fix comment at truncate_setsize()
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>
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
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 --
2011-01-12 18:21 [PATCH] mm: Fix comment at truncate_setsize() Jan Kara
-- strict thread matches above, loose matches on Subject: below --
2010-10-21 9:47 Jan Kara
2010-10-21 9:53 ` Christoph Hellwig
2010-10-21 11:48 ` Al Viro
2010-10-21 15:30 ` 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).