提交 bb33ed63 编写于 作者: D David Howells 提交者: 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: NDavid Howells <dhowells@redhat.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NLinus Torvalds <torvalds@linux-foundation.org>
上级 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% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册