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 <dhowells@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
David Howells 2007-05-15 23:57:04 -07:00 committed by Linus Torvalds
parent 1800782016
commit bb33ed6345

View File

@ -206,7 +206,6 @@ int afs_prepare_write(struct file *file, struct page *page,
_leave(" = %d [prep]", ret); _leave(" = %d [prep]", ret);
return ret; return ret;
} }
SetPageUptodate(page);
} }
try_again: try_again:
@ -311,8 +310,8 @@ int afs_commit_write(struct file *file, struct page *page,
spin_unlock(&vnode->writeback_lock); spin_unlock(&vnode->writeback_lock);
} }
SetPageUptodate(page);
set_page_dirty(page); set_page_dirty(page);
if (PageDirty(page)) if (PageDirty(page))
_debug("dirtied"); _debug("dirtied");