nfsd4: lookup up callback cred only once
[safe/jmp/linux-2.6] / include / linux / nfsd / state.h
index f063df7..8d882a3 100644 (file)
@@ -97,6 +97,7 @@ struct nfs4_callback {
        /* RPC client info */
        atomic_t                cb_set;     /* successful CB_NULL call */
        struct rpc_clnt *       cb_client;
+       struct rpc_cred *       cb_cred;
 };
 
 /* Maximum number of slots per session. 128 is useful for long haul TCP */
@@ -110,6 +111,7 @@ struct nfsd4_cache_entry {
        __be32          ce_status;
        struct kvec     ce_datav; /* encoded NFSv4.1 data in rq_res.head[0] */
        struct page     *ce_respages[NFSD_PAGES_PER_SLOT + 1];
+       int             ce_cachethis;
        short           ce_resused;
        int             ce_opcnt;
        int             ce_rpchdrlen;
@@ -319,6 +321,7 @@ struct nfs4_stateid {
 };
 
 /* flags for preprocess_seqid_op() */
+#define HAS_SESSION             0x00000001
 #define CONFIRM                 0x00000002
 #define OPEN_STATE              0x00000004
 #define LOCK_STATE              0x00000008
@@ -332,7 +335,9 @@ struct nfs4_stateid {
        ((err) != nfserr_stale_stateid) &&      \
        ((err) != nfserr_bad_stateid))
 
-extern __be32 nfs4_preprocess_stateid_op(struct svc_fh *current_fh,
+struct nfsd4_compound_state;
+
+extern __be32 nfs4_preprocess_stateid_op(struct nfsd4_compound_state *cstate,
                stateid_t *stateid, int flags, struct file **filp);
 extern void nfs4_lock_state(void);
 extern void nfs4_unlock_state(void);