Commit 9a773e7c authored by Trond Myklebust's avatar Trond Myklebust

NFS nfs_vm_page_mkwrite: Don't freeze me, Bro...

Prevent filesystem freezes while handling the write page fault.
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@primarydata.com>
parent e95fc4a0
...@@ -569,6 +569,8 @@ static int nfs_vm_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) ...@@ -569,6 +569,8 @@ static int nfs_vm_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
filp, filp->f_mapping->host->i_ino, filp, filp->f_mapping->host->i_ino,
(long long)page_offset(page)); (long long)page_offset(page));
sb_start_pagefault(inode->i_sb);
/* make sure the cache has finished storing the page */ /* make sure the cache has finished storing the page */
nfs_fscache_wait_on_page_write(NFS_I(inode), page); nfs_fscache_wait_on_page_write(NFS_I(inode), page);
...@@ -595,6 +597,7 @@ static int nfs_vm_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) ...@@ -595,6 +597,7 @@ static int nfs_vm_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
out_unlock: out_unlock:
unlock_page(page); unlock_page(page);
out: out:
sb_end_pagefault(inode->i_sb);
return ret; return ret;
} }
......
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