Merge branch 'for-linus' of git://git.o-hand.com/linux-rpurdie-backlight
[pandora-kernel.git] / include / linux / sunrpc / auth.h
index 4e78f0c..7a69ca3 100644 (file)
@@ -16,6 +16,7 @@
 #include <linux/sunrpc/xdr.h>
 
 #include <asm/atomic.h>
+#include <linux/rcupdate.h>
 
 /* size of the nodename buffer */
 #define UNX_MAXNODENAME        32
@@ -35,6 +36,7 @@ struct rpc_credops;
 struct rpc_cred {
        struct hlist_node       cr_hash;        /* hash chain */
        struct list_head        cr_lru;         /* lru garbage collection */
+       struct rcu_head         cr_rcu;
        struct rpc_auth *       cr_auth;
        const struct rpc_credops *cr_ops;
 #ifdef RPC_DEBUG
@@ -50,6 +52,7 @@ struct rpc_cred {
 };
 #define RPCAUTH_CRED_NEW       0
 #define RPCAUTH_CRED_UPTODATE  1
+#define RPCAUTH_CRED_HASHED    2
 
 #define RPCAUTH_CRED_MAGIC     0x0f4aa4f0
 
@@ -60,8 +63,7 @@ struct rpc_cred {
 #define RPC_CREDCACHE_MASK     (RPC_CREDCACHE_NR - 1)
 struct rpc_cred_cache {
        struct hlist_head       hashtable[RPC_CREDCACHE_NR];
-       unsigned long           nextgc;         /* next garbage collection */
-       unsigned long           expire;         /* cache expiry interval */
+       spinlock_t              lock;
 };
 
 struct rpc_authops;
@@ -123,6 +125,10 @@ struct rpc_credops {
 extern const struct rpc_authops        authunix_ops;
 extern const struct rpc_authops        authnull_ops;
 
+void __init            rpc_init_authunix(void);
+void __init            rpcauth_init_module(void);
+void __exit            rpcauth_remove_module(void);
+
 int                    rpcauth_register(const struct rpc_authops *);
 int                    rpcauth_unregister(const struct rpc_authops *);
 struct rpc_auth *      rpcauth_create(rpc_authflavor_t, struct rpc_clnt *);
@@ -141,7 +147,7 @@ int                 rpcauth_unwrap_resp(struct rpc_task *task, kxdrproc_t decode, void *rqstp,
 int                    rpcauth_refreshcred(struct rpc_task *);
 void                   rpcauth_invalcred(struct rpc_task *);
 int                    rpcauth_uptodatecred(struct rpc_task *);
-int                    rpcauth_init_credcache(struct rpc_auth *, unsigned long);
+int                    rpcauth_init_credcache(struct rpc_auth *);
 void                   rpcauth_destroy_credcache(struct rpc_auth *);
 void                   rpcauth_clear_credcache(struct rpc_cred_cache *);