diff options
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 1 | ||||
-rw-r--r-- | net/sunrpc/sched.c | 21 | ||||
-rw-r--r-- | net/sunrpc/xprt.c | 5 |
3 files changed, 20 insertions, 7 deletions
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c index dc6391bcda11..ef6384961808 100644 --- a/net/sunrpc/auth_gss/auth_gss.c +++ b/net/sunrpc/auth_gss/auth_gss.c | |||
@@ -266,6 +266,7 @@ gss_release_msg(struct gss_upcall_msg *gss_msg) | |||
266 | BUG_ON(!list_empty(&gss_msg->list)); | 266 | BUG_ON(!list_empty(&gss_msg->list)); |
267 | if (gss_msg->ctx != NULL) | 267 | if (gss_msg->ctx != NULL) |
268 | gss_put_ctx(gss_msg->ctx); | 268 | gss_put_ctx(gss_msg->ctx); |
269 | rpc_destroy_wait_queue(&gss_msg->rpc_waitqueue); | ||
269 | kfree(gss_msg); | 270 | kfree(gss_msg); |
270 | } | 271 | } |
271 | 272 | ||
diff --git a/net/sunrpc/sched.c b/net/sunrpc/sched.c index caf12fd6b6af..86aa897e7b08 100644 --- a/net/sunrpc/sched.c +++ b/net/sunrpc/sched.c | |||
@@ -214,6 +214,11 @@ void rpc_init_wait_queue(struct rpc_wait_queue *queue, const char *qname) | |||
214 | } | 214 | } |
215 | EXPORT_SYMBOL_GPL(rpc_init_wait_queue); | 215 | EXPORT_SYMBOL_GPL(rpc_init_wait_queue); |
216 | 216 | ||
217 | void rpc_destroy_wait_queue(struct rpc_wait_queue *queue) | ||
218 | { | ||
219 | } | ||
220 | EXPORT_SYMBOL_GPL(rpc_destroy_wait_queue); | ||
221 | |||
217 | static int rpc_wait_bit_killable(void *word) | 222 | static int rpc_wait_bit_killable(void *word) |
218 | { | 223 | { |
219 | if (fatal_signal_pending(current)) | 224 | if (fatal_signal_pending(current)) |
@@ -1020,11 +1025,20 @@ rpc_destroy_mempool(void) | |||
1020 | kmem_cache_destroy(rpc_task_slabp); | 1025 | kmem_cache_destroy(rpc_task_slabp); |
1021 | if (rpc_buffer_slabp) | 1026 | if (rpc_buffer_slabp) |
1022 | kmem_cache_destroy(rpc_buffer_slabp); | 1027 | kmem_cache_destroy(rpc_buffer_slabp); |
1028 | rpc_destroy_wait_queue(&delay_queue); | ||
1023 | } | 1029 | } |
1024 | 1030 | ||
1025 | int | 1031 | int |
1026 | rpc_init_mempool(void) | 1032 | rpc_init_mempool(void) |
1027 | { | 1033 | { |
1034 | /* | ||
1035 | * The following is not strictly a mempool initialisation, | ||
1036 | * but there is no harm in doing it here | ||
1037 | */ | ||
1038 | rpc_init_wait_queue(&delay_queue, "delayq"); | ||
1039 | if (!rpciod_start()) | ||
1040 | goto err_nomem; | ||
1041 | |||
1028 | rpc_task_slabp = kmem_cache_create("rpc_tasks", | 1042 | rpc_task_slabp = kmem_cache_create("rpc_tasks", |
1029 | sizeof(struct rpc_task), | 1043 | sizeof(struct rpc_task), |
1030 | 0, SLAB_HWCACHE_ALIGN, | 1044 | 0, SLAB_HWCACHE_ALIGN, |
@@ -1045,13 +1059,6 @@ rpc_init_mempool(void) | |||
1045 | rpc_buffer_slabp); | 1059 | rpc_buffer_slabp); |
1046 | if (!rpc_buffer_mempool) | 1060 | if (!rpc_buffer_mempool) |
1047 | goto err_nomem; | 1061 | goto err_nomem; |
1048 | if (!rpciod_start()) | ||
1049 | goto err_nomem; | ||
1050 | /* | ||
1051 | * The following is not strictly a mempool initialisation, | ||
1052 | * but there is no harm in doing it here | ||
1053 | */ | ||
1054 | rpc_init_wait_queue(&delay_queue, "delayq"); | ||
1055 | return 0; | 1062 | return 0; |
1056 | err_nomem: | 1063 | err_nomem: |
1057 | rpc_destroy_mempool(); | 1064 | rpc_destroy_mempool(); |
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index 9bf118c54316..85199c647022 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c | |||
@@ -1052,6 +1052,11 @@ static void xprt_destroy(struct kref *kref) | |||
1052 | xprt->shutdown = 1; | 1052 | xprt->shutdown = 1; |
1053 | del_timer_sync(&xprt->timer); | 1053 | del_timer_sync(&xprt->timer); |
1054 | 1054 | ||
1055 | rpc_destroy_wait_queue(&xprt->binding); | ||
1056 | rpc_destroy_wait_queue(&xprt->pending); | ||
1057 | rpc_destroy_wait_queue(&xprt->sending); | ||
1058 | rpc_destroy_wait_queue(&xprt->resend); | ||
1059 | rpc_destroy_wait_queue(&xprt->backlog); | ||
1055 | /* | 1060 | /* |
1056 | * Tear down transport state and free the rpc_xprt | 1061 | * Tear down transport state and free the rpc_xprt |
1057 | */ | 1062 | */ |