diff options
| -rw-r--r-- | include/linux/sunrpc/svcauth.h | 3 | ||||
| -rw-r--r-- | net/sunrpc/svc_xprt.c | 5 | ||||
| -rw-r--r-- | net/sunrpc/svcauth_unix.c | 9 |
3 files changed, 10 insertions, 7 deletions
diff --git a/include/linux/sunrpc/svcauth.h b/include/linux/sunrpc/svcauth.h index 11266935e2d..18bce95255a 100644 --- a/include/linux/sunrpc/svcauth.h +++ b/include/linux/sunrpc/svcauth.h | |||
| @@ -116,6 +116,7 @@ struct auth_ops { | |||
| 116 | #define SVC_PENDING 9 | 116 | #define SVC_PENDING 9 |
| 117 | #define SVC_COMPLETE 10 | 117 | #define SVC_COMPLETE 10 |
| 118 | 118 | ||
| 119 | struct svc_xprt; | ||
| 119 | 120 | ||
| 120 | extern int svc_authenticate(struct svc_rqst *rqstp, __be32 *authp); | 121 | extern int svc_authenticate(struct svc_rqst *rqstp, __be32 *authp); |
| 121 | extern int svc_authorise(struct svc_rqst *rqstp); | 122 | extern int svc_authorise(struct svc_rqst *rqstp); |
| @@ -131,7 +132,7 @@ extern struct auth_domain *auth_domain_find(char *name); | |||
| 131 | extern struct auth_domain *auth_unix_lookup(struct in6_addr *addr); | 132 | extern struct auth_domain *auth_unix_lookup(struct in6_addr *addr); |
| 132 | extern int auth_unix_forget_old(struct auth_domain *dom); | 133 | extern int auth_unix_forget_old(struct auth_domain *dom); |
| 133 | extern void svcauth_unix_purge(void); | 134 | extern void svcauth_unix_purge(void); |
| 134 | extern void svcauth_unix_info_release(void *); | 135 | extern void svcauth_unix_info_release(struct svc_xprt *xpt); |
| 135 | extern int svcauth_unix_set_client(struct svc_rqst *rqstp); | 136 | extern int svcauth_unix_set_client(struct svc_rqst *rqstp); |
| 136 | 137 | ||
| 137 | static inline unsigned long hash_str(char *name, int bits) | 138 | static inline unsigned long hash_str(char *name, int bits) |
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index 95fc3e8c51d..385d822419c 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c | |||
| @@ -128,9 +128,8 @@ static void svc_xprt_free(struct kref *kref) | |||
| 128 | struct svc_xprt *xprt = | 128 | struct svc_xprt *xprt = |
| 129 | container_of(kref, struct svc_xprt, xpt_ref); | 129 | container_of(kref, struct svc_xprt, xpt_ref); |
| 130 | struct module *owner = xprt->xpt_class->xcl_owner; | 130 | struct module *owner = xprt->xpt_class->xcl_owner; |
| 131 | if (test_bit(XPT_CACHE_AUTH, &xprt->xpt_flags) && | 131 | if (test_bit(XPT_CACHE_AUTH, &xprt->xpt_flags)) |
| 132 | xprt->xpt_auth_cache != NULL) | 132 | svcauth_unix_info_release(xprt); |
| 133 | svcauth_unix_info_release(xprt->xpt_auth_cache); | ||
| 134 | xprt->xpt_ops->xpo_free(xprt); | 133 | xprt->xpt_ops->xpo_free(xprt); |
| 135 | module_put(owner); | 134 | module_put(owner); |
| 136 | } | 135 | } |
diff --git a/net/sunrpc/svcauth_unix.c b/net/sunrpc/svcauth_unix.c index 31b99c599e7..49e39ff2291 100644 --- a/net/sunrpc/svcauth_unix.c +++ b/net/sunrpc/svcauth_unix.c | |||
| @@ -472,10 +472,13 @@ ip_map_cached_put(struct svc_rqst *rqstp, struct ip_map *ipm) | |||
| 472 | } | 472 | } |
| 473 | 473 | ||
| 474 | void | 474 | void |
| 475 | svcauth_unix_info_release(void *info) | 475 | svcauth_unix_info_release(struct svc_xprt *xpt) |
| 476 | { | 476 | { |
| 477 | struct ip_map *ipm = info; | 477 | struct ip_map *ipm; |
| 478 | cache_put(&ipm->h, &ip_map_cache); | 478 | |
| 479 | ipm = xpt->xpt_auth_cache; | ||
| 480 | if (ipm != NULL) | ||
| 481 | cache_put(&ipm->h, &ip_map_cache); | ||
| 479 | } | 482 | } |
| 480 | 483 | ||
| 481 | /**************************************************************************** | 484 | /**************************************************************************** |
