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>

authored by David Howells and committed by Linus Torvalds bb33ed63 18007820

+1 -2
+1 -2
fs/afs/write.c
··· 206 _leave(" = %d [prep]", ret); 207 return ret; 208 } 209 - SetPageUptodate(page); 210 } 211 212 try_again: ··· 310 spin_unlock(&vnode->writeback_lock); 311 } 312 313 set_page_dirty(page); 314 - 315 if (PageDirty(page)) 316 _debug("dirtied"); 317
··· 206 _leave(" = %d [prep]", ret); 207 return ret; 208 } 209 } 210 211 try_again: ··· 311 spin_unlock(&vnode->writeback_lock); 312 } 313 314 + SetPageUptodate(page); 315 set_page_dirty(page); 316 if (PageDirty(page)) 317 _debug("dirtied"); 318