diff options
author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-06-24 15:55:26 -0400 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2007-07-10 23:40:36 -0400 |
commit | 31be5bf15f3dafffce110eb1afadccbf2e3067b4 (patch) | |
tree | 6e680e926d79a1c5fe6a5a726c3f16cb3b86adfa /net/sunrpc/auth_unix.c | |
parent | e092bdcd939416ef911090890096fe07d0281a5e (diff) | |
download | kernel_samsung_smdk4412-31be5bf15f3dafffce110eb1afadccbf2e3067b4.zip kernel_samsung_smdk4412-31be5bf15f3dafffce110eb1afadccbf2e3067b4.tar.gz kernel_samsung_smdk4412-31be5bf15f3dafffce110eb1afadccbf2e3067b4.tar.bz2 |
SUNRPC: Convert the credcache lookup code to use RCU
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'net/sunrpc/auth_unix.c')
-rw-r--r-- | net/sunrpc/auth_unix.c | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/net/sunrpc/auth_unix.c b/net/sunrpc/auth_unix.c index 29d50ff..f7ff6ad 100644 --- a/net/sunrpc/auth_unix.c +++ b/net/sunrpc/auth_unix.c @@ -93,11 +93,23 @@ unx_create_cred(struct rpc_auth *auth, struct auth_cred *acred, int flags) } static void -unx_destroy_cred(struct rpc_cred *rcred) +unx_free_cred(struct unx_cred *unx_cred) { - struct unx_cred *cred = container_of(rcred, struct unx_cred, uc_base); + dprintk("RPC: unx_free_cred %p\n", unx_cred); + kfree(unx_cred); +} + +static void +unx_free_cred_callback(struct rcu_head *head) +{ + struct unx_cred *unx_cred = container_of(head, struct unx_cred, uc_base.cr_rcu); + unx_free_cred(unx_cred); +} - kfree(cred); +static void +unx_destroy_cred(struct rpc_cred *cred) +{ + call_rcu(&cred->cr_rcu, unx_free_cred_callback); } /* |