summaryrefslogtreecommitdiffstats
path: root/fs/nfs/internal.h
diff options
context:
space:
mode:
authorTrond Myklebust2015-10-01 23:17:06 +0200
committerTrond Myklebust2015-12-31 21:55:35 +0100
commit138a2935dc9783b131d9647c3bddb22ae5c84d77 (patch)
treec21379e9e3c162c65ee5a6145e6081baaae1dfd6 /fs/nfs/internal.h
parentNFSv4.1/pNFS: Don't queue up a new commit if the layout segment is invalid (diff)
downloadkernel-qcow2-linux-138a2935dc9783b131d9647c3bddb22ae5c84d77.tar.gz
kernel-qcow2-linux-138a2935dc9783b131d9647c3bddb22ae5c84d77.tar.xz
kernel-qcow2-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/internal.h')
-rw-r--r--fs/nfs/internal.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/nfs/internal.h b/fs/nfs/internal.h
index 99a2919047e9..870e2ba7ba49 100644
--- a/fs/nfs/internal.h
+++ b/fs/nfs/internal.h
@@ -264,6 +264,12 @@ static inline bool nfs_pgio_has_mirroring(struct nfs_pageio_descriptor *desc)
return desc->pg_mirror_count > 1;
}
+static inline bool nfs_match_open_context(const struct nfs_open_context *ctx1,
+ const struct nfs_open_context *ctx2)
+{
+ return ctx1->cred == ctx2->cred && ctx1->state == ctx2->state;
+}
+
/* nfs2xdr.c */
extern struct rpc_procinfo nfs_procedures[];
extern int nfs2_decode_dirent(struct xdr_stream *,