Skip to content

Commit

Permalink
NFS nfs_vm_page_mkwrite: Don't freeze me, Bro...
Browse files Browse the repository at this point in the history
Prevent filesystem freezes while handling the write page fault.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
  • Loading branch information
Trond Myklebust committed Jul 5, 2016
1 parent e95fc4a commit 9a773e7
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions fs/nfs/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
(long long)page_offset(page));

sb_start_pagefault(inode->i_sb);

/* make sure the cache has finished storing the page */
nfs_fscache_wait_on_page_write(NFS_I(inode), page);

Expand All @@ -595,6 +597,7 @@ static int nfs_vm_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
out_unlock:
unlock_page(page);
out:
sb_end_pagefault(inode->i_sb);
return ret;
}

Expand Down

0 comments on commit 9a773e7

Please sign in to comment.