nfsd: Headers Independence and include cleanups
[pandora-kernel.git] / include / linux / nfsd / xdr4.h
index 2bacf75..1bf2662 100644 (file)
@@ -39,7 +39,8 @@
 #ifndef _LINUX_NFSD_XDR4_H
 #define _LINUX_NFSD_XDR4_H
 
-#include <linux/nfs4.h>
+#include <linux/nfsd/state.h>
+#include <linux/nfsd/nfsd.h>
 
 #define NFSD4_MAX_TAGLEN       128
 #define XDR_LEN(n)                     (((n) + 3) & ~3)
@@ -51,7 +52,7 @@ struct nfsd4_compound_state {
        /* For sessions DRC */
        struct nfsd4_session    *session;
        struct nfsd4_slot       *slot;
-       __be32                  *statp;
+       __be32                  *datap;
        size_t                  iovlen;
        u32                     minorversion;
        u32                     status;
@@ -366,18 +367,6 @@ struct nfsd4_exchange_id {
        int             spa_how;
 };
 
-struct nfsd4_create_session {
-       clientid_t              clientid;
-       struct nfs4_sessionid   sessionid;
-       u32                     seqid;
-       u32                     flags;
-       struct nfsd4_channel_attrs fore_channel;
-       struct nfsd4_channel_attrs back_channel;
-       u32                     callback_prog;
-       u32                     uid;
-       u32                     gid;
-};
-
 struct nfsd4_sequence {
        struct nfs4_sessionid   sessionid;              /* request/response */
        u32                     seqid;                  /* request/response */
@@ -479,13 +468,12 @@ struct nfsd4_compoundres {
 static inline bool nfsd4_is_solo_sequence(struct nfsd4_compoundres *resp)
 {
        struct nfsd4_compoundargs *args = resp->rqstp->rq_argp;
-       return args->opcnt == 1;
+       return resp->opcnt == 1 && args->ops[0].opnum == OP_SEQUENCE;
 }
 
 static inline bool nfsd4_not_cached(struct nfsd4_compoundres *resp)
 {
-       return !resp->cstate.slot->sl_cache_entry.ce_cachethis ||
-                       nfsd4_is_solo_sequence(resp);
+       return !resp->cstate.slot->sl_cachethis || nfsd4_is_solo_sequence(resp);
 }
 
 #define NFS4_SVC_XDRSIZE               sizeof(struct nfsd4_compoundargs)