Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

svcrdma: Remove svc_rdma_wq

Clean up: the system workqueue will work just as well.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>

authored by

Chuck Lever and committed by
J. Bruce Fields
d6dfe43e 10fa8acf

+2 -9
-1
include/linux/sunrpc/svc_rdma.h
··· 200 200 #endif 201 201 202 202 /* svc_rdma.c */ 203 - extern struct workqueue_struct *svc_rdma_wq; 204 203 extern int svc_rdma_init(void); 205 204 extern void svc_rdma_cleanup(void); 206 205
-7
net/sunrpc/xprtrdma/svc_rdma.c
··· 73 73 atomic_t rdma_stat_sq_poll; 74 74 atomic_t rdma_stat_sq_prod; 75 75 76 - struct workqueue_struct *svc_rdma_wq; 77 - 78 76 /* 79 77 * This function implements reading and resetting an atomic_t stat 80 78 * variable through read/write to a proc file. Any write to the file ··· 228 230 void svc_rdma_cleanup(void) 229 231 { 230 232 dprintk("SVCRDMA Module Removed, deregister RPC RDMA transport\n"); 231 - destroy_workqueue(svc_rdma_wq); 232 233 if (svcrdma_table_header) { 233 234 unregister_sysctl_table(svcrdma_table_header); 234 235 svcrdma_table_header = NULL; ··· 242 245 dprintk("\tmax_requests : %u\n", svcrdma_max_requests); 243 246 dprintk("\tmax_bc_requests : %u\n", svcrdma_max_bc_requests); 244 247 dprintk("\tmax_inline : %d\n", svcrdma_max_req_size); 245 - 246 - svc_rdma_wq = alloc_workqueue("svc_rdma", 0, 0); 247 - if (!svc_rdma_wq) 248 - return -ENOMEM; 249 248 250 249 if (!svcrdma_table_header) 251 250 svcrdma_table_header =
+2 -1
net/sunrpc/xprtrdma/svc_rdma_transport.c
··· 630 630 { 631 631 struct svcxprt_rdma *rdma = 632 632 container_of(xprt, struct svcxprt_rdma, sc_xprt); 633 + 633 634 INIT_WORK(&rdma->sc_work, __svc_rdma_free); 634 - queue_work(svc_rdma_wq, &rdma->sc_work); 635 + schedule_work(&rdma->sc_work); 635 636 } 636 637 637 638 static int svc_rdma_has_wspace(struct svc_xprt *xprt)