diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-03-03 06:06:35 +0100 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-03-03 19:58:08 +0100 |
commit | ef070dcb3989f553f5d84edf555eebc7e204099d (patch) | |
tree | 57a10c226e43b7eb28b03786591164686d88fbf5 /fs/nfs/file.c | |
parent | NFS: Fix a regression in the read() syscall (diff) | |
download | linux-ef070dcb3989f553f5d84edf555eebc7e204099d.tar.xz linux-ef070dcb3989f553f5d84edf555eebc7e204099d.zip |
NFS: Don't write enable new pages while an invalidation is proceeding
nfs_vm_page_mkwrite() should wait until the page cache invalidation
is finished. This is the second patch in a 2 patch series to deprecate
the NFS client's reliance on nfs_release_page() in the context of
nfs_invalidate_mapping().
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/file.c')
-rw-r--r-- | fs/nfs/file.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c index 41963ffca597..e679d24c39d3 100644 --- a/fs/nfs/file.c +++ b/fs/nfs/file.c @@ -623,6 +623,9 @@ static int nfs_vm_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf) /* make sure the cache has finished storing the page */ nfs_fscache_wait_on_page_write(NFS_I(inode), page); + wait_on_bit_action(&NFS_I(inode)->flags, NFS_INO_INVALIDATING, + nfs_wait_bit_killable, TASK_KILLABLE); + lock_page(page); mapping = page_file_mapping(page); if (mapping != inode->i_mapping) |