summaryrefslogtreecommitdiffstats
path: root/fs/nfs/write.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@primarydata.com>2015-10-01 23:17:06 +0200
committerTrond Myklebust <trond.myklebust@primarydata.com>2015-12-31 21:55:35 +0100
commit138a2935dc9783b131d9647c3bddb22ae5c84d77 (patch)
treec21379e9e3c162c65ee5a6145e6081baaae1dfd6 /fs/nfs/write.c
parentNFSv4.1/pNFS: Don't queue up a new commit if the layout segment is invalid (diff)
downloadlinux-138a2935dc9783b131d9647c3bddb22ae5c84d77.tar.xz
linux-138a2935dc9783b131d9647c3bddb22ae5c84d77.zip
NFS: Relax requirements in nfs_flush_incompatible
If two processes share the same credentials and NFSv4 open stateid, then allow them both to dirty the same page, even if their nfs_open_context differs. Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Diffstat (limited to 'fs/nfs/write.c')
-rw-r--r--fs/nfs/write.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c
index 0aa8d6f23b4c..2c26e04d9396 100644
--- a/fs/nfs/write.c
+++ b/fs/nfs/write.c
@@ -1130,7 +1130,8 @@ int nfs_flush_incompatible(struct file *file, struct page *page)
if (req == NULL)
return 0;
l_ctx = req->wb_lock_context;
- do_flush = req->wb_page != page || req->wb_context != ctx;
+ do_flush = req->wb_page != page ||
+ !nfs_match_open_context(req->wb_context, ctx);
/* for now, flush if more than 1 request in page_group */
do_flush |= req->wb_this_page != req;
if (l_ctx && flctx &&