Commit 70ef3851 authored by David Howells's avatar David Howells Committed by Steve French

cifs: writeback fix

Wait for the page to be written to the cache before we allow it
to be modified
Signed-off-by: default avatarDavid Howells <dhowells@redhat.com>
Reviewed-by: default avatarPaulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: default avatarSteve French <stfrench@microsoft.com>
parent 5d7e2825
......@@ -4210,13 +4210,19 @@ cifs_page_mkwrite(struct vm_fault *vmf)
{
struct page *page = vmf->page;
/* Wait for the page to be written to the cache before we allow it to
* be modified. We then assume the entire page will need writing back.
*/
#ifdef CONFIG_CIFS_FSCACHE
if (PageFsCache(page) &&
wait_on_page_fscache_killable(page) < 0)
return VM_FAULT_RETRY;
#endif
lock_page(page);
wait_on_page_writeback(page);
if (lock_page_killable(page) < 0)
return VM_FAULT_RETRY;
return VM_FAULT_LOCKED;
}
......
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