From: David Howells Date: Wed, 16 May 2007 06:57:04 +0000 (-0700) Subject: AFS: Fix afs_prepare_write() X-Git-Tag: v3.12-rc1~29503 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bb33ed6345d6156484f39089aa8b52f44ce76609;p=kernel%2Fkernel-generic.git AFS: Fix afs_prepare_write() 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. Signed-off-by: David Howells Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- 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");