diff options
Diffstat (limited to 'net/sunrpc/sched.c')
-rw-r--r-- | net/sunrpc/sched.c | 21 |
1 files changed, 14 insertions, 7 deletions
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(); |