aboutsummaryrefslogtreecommitdiffstats
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 03df22822c4c..5eccea127cac 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -689,7 +689,9 @@ int nfs_flush_incompatible(struct file *file, struct page *page)
689 req = nfs_page_find_request(page); 689 req = nfs_page_find_request(page);
690 if (req == NULL) 690 if (req == NULL)
691 return 0; 691 return 0;
692 do_flush = req->wb_page != page || req->wb_context != ctx; 692 do_flush = req->wb_page != page || req->wb_context != ctx ||
693 req->wb_lock_context->lockowner != current->files ||
694 req->wb_lock_context->pid != current->tgid;
693 nfs_release_request(req); 695 nfs_release_request(req);
694 if (!do_flush) 696 if (!do_flush)
695 return 0; 697 return 0;
@@ -813,6 +815,7 @@ static int nfs_write_rpcsetup(struct nfs_page *req,
813 data->args.pages = data->pagevec; 815 data->args.pages = data->pagevec;
814 data->args.count = count; 816 data->args.count = count;
815 data->args.context = get_nfs_open_context(req->wb_context); 817 data->args.context = get_nfs_open_context(req->wb_context);
818 data->args.lock_context = req->wb_lock_context;
816 data->args.stable = NFS_UNSTABLE; 819 data->args.stable = NFS_UNSTABLE;
817 if (how & FLUSH_STABLE) { 820 if (how & FLUSH_STABLE) {
818 data->args.stable = NFS_DATA_SYNC; 821 data->args.stable = NFS_DATA_SYNC;