diff options
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 29d50ffa69d6..f7ff6ad3259e 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) | |||
93 | } | 93 | } |
94 | 94 | ||
95 | static void | 95 | static void |
96 | unx_destroy_cred(struct rpc_cred *rcred) | 96 | unx_free_cred(struct unx_cred *unx_cred) |
97 | { | 97 | { |
98 | struct unx_cred *cred = container_of(rcred, struct unx_cred, uc_base); | 98 | dprintk("RPC: unx_free_cred %p\n", unx_cred); |
99 | kfree(unx_cred); | ||
100 | } | ||
101 | |||
102 | static void | ||
103 | unx_free_cred_callback(struct rcu_head *head) | ||
104 | { | ||
105 | struct unx_cred *unx_cred = container_of(head, struct unx_cred, uc_base.cr_rcu); | ||
106 | unx_free_cred(unx_cred); | ||
107 | } | ||
99 | 108 | ||
100 | kfree(cred); | 109 | static void |
110 | unx_destroy_cred(struct rpc_cred *cred) | ||
111 | { | ||
112 | call_rcu(&cred->cr_rcu, unx_free_cred_callback); | ||
101 | } | 113 | } |
102 | 114 | ||
103 | /* | 115 | /* |