summaryrefslogtreecommitdiffstats
path: root/fs/nfsd/xdr4.h
diff options
context:
space:
mode:
authorTigran Mkrtchyan2012-02-13 22:55:32 +0100
committerJ. Bruce Fields2012-02-15 17:20:45 +0100
commit37c593c57324740821766c56e48cf09776a68a9c (patch)
tree9c6f91acb532da56f5d5f24c2aa8a345f717c81a /fs/nfsd/xdr4.h
parentnfsd41: consume current stateid on DELEGRETURN and OPENDOWNGRADE (diff)
downloadkernel-qcow2-linux-37c593c57324740821766c56e48cf09776a68a9c.tar.gz
kernel-qcow2-linux-37c593c57324740821766c56e48cf09776a68a9c.tar.xz
kernel-qcow2-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)