Re: [PATCH 1/2] AFS: Fix afs_prepare_write()

From: Nick Piggin
Date: Tue May 15 2007 - 20:25:07 EST


David Howells wrote:
afs_prepare_write() should not mark a page up to date if it only partially
fills it in, in expectation of the caller filling in the rest prior to calling
commit_write(). commit_write(), however, should mark the page up to date.

Acked-by: Nick Piggin <npiggin@xxxxxxx>


Signed-off-by: David Howells <dhowells@xxxxxxxxxx>
---

fs/afs/write.c | 3 +--
1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/fs/afs/write.c b/fs/afs/write.c
index 28f3751..a03b92a 100644
--- a/fs/afs/write.c
+++ b/fs/afs/write.c
@@ -206,7 +206,6 @@ int afs_prepare_write(struct file *file, struct page *page,
_leave(" = %d [prep]", ret);
return ret;
}
- SetPageUptodate(page);
}
try_again:
@@ -311,8 +310,8 @@ int afs_commit_write(struct file *file, struct page *page,
spin_unlock(&vnode->writeback_lock);
}
+ SetPageUptodate(page);
set_page_dirty(page);
-
if (PageDirty(page))
_debug("dirtied");





--
SUSE Labs, Novell Inc.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/