summaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorChuck Lever <chuck.lever@oracle.com>2016-01-07 14:49:28 -0500
committerDoug Ledford <dledford@redhat.com>2016-01-19 15:30:48 -0500
commit71810ef3271d1a06f7002c55c7e354d8c3233762 (patch)
treebd21f55de8eee5159e5eacc48eea883572ecb5d1 /net/sunrpc
parent2fe81b239dbb00d0a2fd8858ac9dd4ef4a8841ee (diff)
svcrdma: Remove unused req_map and ctxt kmem_caches
Clean up. Signed-off-by: Chuck Lever <chuck.lever@oracle.com> Acked-by: Bruce Fields <bfields@fieldses.org> Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/xprtrdma/svc_rdma.c35
-rw-r--r--net/sunrpc/xprtrdma/xprt_rdma.h7
2 files changed, 0 insertions, 42 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma.c b/net/sunrpc/xprtrdma/svc_rdma.c
index 1b7051bdbdc8..e894e0698c45 100644
--- a/net/sunrpc/xprtrdma/svc_rdma.c
+++ b/net/sunrpc/xprtrdma/svc_rdma.c
@@ -71,10 +71,6 @@ atomic_t rdma_stat_rq_prod;
71atomic_t rdma_stat_sq_poll; 71atomic_t rdma_stat_sq_poll;
72atomic_t rdma_stat_sq_prod; 72atomic_t rdma_stat_sq_prod;
73 73
74/* Temporary NFS request map and context caches */
75struct kmem_cache *svc_rdma_map_cachep;
76struct kmem_cache *svc_rdma_ctxt_cachep;
77
78struct workqueue_struct *svc_rdma_wq; 74struct workqueue_struct *svc_rdma_wq;
79 75
80/* 76/*
@@ -243,8 +239,6 @@ void svc_rdma_cleanup(void)
243 svc_unreg_xprt_class(&svc_rdma_bc_class); 239 svc_unreg_xprt_class(&svc_rdma_bc_class);
244#endif 240#endif
245 svc_unreg_xprt_class(&svc_rdma_class); 241 svc_unreg_xprt_class(&svc_rdma_class);
246 kmem_cache_destroy(svc_rdma_map_cachep);
247 kmem_cache_destroy(svc_rdma_ctxt_cachep);
248} 242}
249 243
250int svc_rdma_init(void) 244int svc_rdma_init(void)
@@ -264,39 +258,10 @@ int svc_rdma_init(void)
264 svcrdma_table_header = 258 svcrdma_table_header =
265 register_sysctl_table(svcrdma_root_table); 259 register_sysctl_table(svcrdma_root_table);
266 260
267 /* Create the temporary map cache */
268 svc_rdma_map_cachep = kmem_cache_create("svc_rdma_map_cache",
269 sizeof(struct svc_rdma_req_map),
270 0,
271 SLAB_HWCACHE_ALIGN,
272 NULL);
273 if (!svc_rdma_map_cachep) {
274 printk(KERN_INFO "Could not allocate map cache.\n");
275 goto err0;
276 }
277
278 /* Create the temporary context cache */
279 svc_rdma_ctxt_cachep =
280 kmem_cache_create("svc_rdma_ctxt_cache",
281 sizeof(struct svc_rdma_op_ctxt),
282 0,
283 SLAB_HWCACHE_ALIGN,
284 NULL);
285 if (!svc_rdma_ctxt_cachep) {
286 printk(KERN_INFO "Could not allocate WR ctxt cache.\n");
287 goto err1;
288 }
289
290 /* Register RDMA with the SVC transport switch */ 261 /* Register RDMA with the SVC transport switch */
291 svc_reg_xprt_class(&svc_rdma_class); 262 svc_reg_xprt_class(&svc_rdma_class);
292#if defined(CONFIG_SUNRPC_BACKCHANNEL) 263#if defined(CONFIG_SUNRPC_BACKCHANNEL)
293 svc_reg_xprt_class(&svc_rdma_bc_class); 264 svc_reg_xprt_class(&svc_rdma_bc_class);
294#endif 265#endif
295 return 0; 266 return 0;
296 err1:
297 kmem_cache_destroy(svc_rdma_map_cachep);
298 err0:
299 unregister_sysctl_table(svcrdma_table_header);
300 destroy_workqueue(svc_rdma_wq);
301 return -ENOMEM;
302} 267}
diff --git a/net/sunrpc/xprtrdma/xprt_rdma.h b/net/sunrpc/xprtrdma/xprt_rdma.h
index 419719198caf..72276c7907e4 100644
--- a/net/sunrpc/xprtrdma/xprt_rdma.h
+++ b/net/sunrpc/xprtrdma/xprt_rdma.h
@@ -528,11 +528,4 @@ void xprt_rdma_bc_free_rqst(struct rpc_rqst *);
528void xprt_rdma_bc_destroy(struct rpc_xprt *, unsigned int); 528void xprt_rdma_bc_destroy(struct rpc_xprt *, unsigned int);
529#endif /* CONFIG_SUNRPC_BACKCHANNEL */ 529#endif /* CONFIG_SUNRPC_BACKCHANNEL */
530 530
531/* Temporary NFS request map cache. Created in svc_rdma.c */
532extern struct kmem_cache *svc_rdma_map_cachep;
533/* WR context cache. Created in svc_rdma.c */
534extern struct kmem_cache *svc_rdma_ctxt_cachep;
535/* Workqueue created in svc_rdma.c */
536extern struct workqueue_struct *svc_rdma_wq;
537
538#endif /* _LINUX_SUNRPC_XPRT_RDMA_H */ 531#endif /* _LINUX_SUNRPC_XPRT_RDMA_H */