summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/vfs.h
diff options
context:
space:
mode:
authorKinglong Mee <kinglongmee@gmail.com>2015-07-30 21:55:02 +0800
committerJ. Bruce Fields <bfields@redhat.com>2015-08-31 16:16:39 -0400
commitead8fb8c24411722b92198b3dccd102a76cdd050 (patch)
tree5f741c274eac984860fff4fe32955d86eb7b2cb3 /fs/nfsd/vfs.h
parent7d580722c9f353d19e255f929d341caa821060d6 (diff)
downloadop-kernel-dev-ead8fb8c24411722b92198b3dccd102a76cdd050.zip
op-kernel-dev-ead8fb8c24411722b92198b3dccd102a76cdd050.tar.gz
NFSD: Set the attributes used to store the verifier for EXCLUSIVE4_1
According to rfc5661 18.16.4, "If EXCLUSIVE4_1 was used, the client determines the attributes used for the verifier by comparing attrset with cva_attrs.attrmask;" So, EXCLUSIVE4_1 also needs those bitmask used to store the verifier. Signed-off-by: Kinglong Mee <kinglongmee@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/vfs.h')
-rw-r--r--fs/nfsd/vfs.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/nfsd/vfs.h b/fs/nfsd/vfs.h
index 5be875e..fee2451 100644
--- a/fs/nfsd/vfs.h
+++ b/fs/nfsd/vfs.h
@@ -131,4 +131,10 @@ static inline __be32 fh_getattr(struct svc_fh *fh, struct kstat *stat)
return nfserrno(vfs_getattr(&p, stat));
}
+static inline int nfsd_create_is_exclusive(int createmode)
+{
+ return createmode == NFS3_CREATE_EXCLUSIVE
+ || createmode == NFS4_CREATE_EXCLUSIVE4_1;
+}
+
#endif /* LINUX_NFSD_VFS_H */
OpenPOWER on IntegriCloud