mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-28 22:54:05 +08:00
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:
parent
1800782016
commit
bb33ed6345
@ -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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user