summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/xdr4.h
diff options
context:
space:
mode:
authorTigran Mkrtchyan <kofemann@gmail.com>2012-02-13 22:55:32 +0100
committerJ. Bruce Fields <bfields@redhat.com>2012-02-15 11:20:45 -0500
commit37c593c57324740821766c56e48cf09776a68a9c (patch)
tree9c6f91acb532da56f5d5f24c2aa8a345f717c81a /fs/nfsd/xdr4.h
parent9428fe1abb672c67169d3b6abf0faa120f020c32 (diff)
downloadlinux-37c593c57324740821766c56e48cf09776a68a9c.tar.gz
linux-37c593c57324740821766c56e48cf09776a68a9c.tar.bz2
linux-37c593c57324740821766c56e48cf09776a68a9c.zip
nfsd41: use current stateid by value
Signed-off-by: Tigran Mkrtchyan <kofemann@gmail.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/xdr4.h')
-rw-r--r--fs/nfsd/xdr4.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/fs/nfsd/xdr4.h b/fs/nfsd/xdr4.h
index 3c1ddd7f13a4..12789eb3f911 100644
--- a/fs/nfsd/xdr4.h
+++ b/fs/nfsd/xdr4.h
@@ -43,6 +43,13 @@
#define NFSD4_MAX_TAGLEN 128
#define XDR_LEN(n) (((n) + 3) & ~3)
+#define CURRENT_STATE_ID_FLAG (1<<0)
+#define SAVED_STATE_ID_FLAG (1<<1)
+
+#define SET_STATE_ID(c, f) ((c)->sid_flags |= (f))
+#define HAS_STATE_ID(c, f) ((c)->sid_flags & (f))
+#define CLEAR_STATE_ID(c, f) ((c)->sid_flags &= ~(f))
+
struct nfsd4_compound_state {
struct svc_fh current_fh;
struct svc_fh save_fh;
@@ -54,8 +61,10 @@ struct nfsd4_compound_state {
size_t iovlen;
u32 minorversion;
u32 status;
- const stateid_t *current_stateid;
- const stateid_t *save_stateid;
+ stateid_t current_stateid;
+ stateid_t save_stateid;
+ /* to indicate current and saved state id presents */
+ u32 sid_flags;
};
static inline bool nfsd4_has_session(struct nfsd4_compound_state *cs)