Commit bb33ed63 authored by David Howells's avatar David Howells Committed by Linus Torvalds

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: default avatarDavid Howells <dhowells@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 18007820
...@@ -206,7 +206,6 @@ int afs_prepare_write(struct file *file, struct page *page, ...@@ -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, ...@@ -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");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment