]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
svcrdma: Remove svc_rdma_wq
authorChuck Lever <chuck.lever@oracle.com>
Fri, 16 Aug 2019 21:48:36 +0000 (17:48 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Mon, 19 Aug 2019 14:59:28 +0000 (10:59 -0400)
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>
include/linux/sunrpc/svc_rdma.h
net/sunrpc/xprtrdma/svc_rdma.c
net/sunrpc/xprtrdma/svc_rdma_transport.c

index 981f0d726ad4b7eaf5e7ac118edd2e5b7ab06d02..edb39900fe04d9e07236a968dde3fbd61e5b9da0 100644 (file)
@@ -200,7 +200,6 @@ extern struct svc_xprt_class svc_rdma_bc_class;
 #endif
 
 /* svc_rdma.c */
-extern struct workqueue_struct *svc_rdma_wq;
 extern int svc_rdma_init(void);
 extern void svc_rdma_cleanup(void);
 
index abdb3004a1e35cb6e6a5c624904938e1b70b3c0f..97bca509a391bdb8d84732294b8b9f7fb6ceee55 100644 (file)
@@ -73,8 +73,6 @@ atomic_t rdma_stat_rq_prod;
 atomic_t rdma_stat_sq_poll;
 atomic_t rdma_stat_sq_prod;
 
-struct workqueue_struct *svc_rdma_wq;
-
 /*
  * This function implements reading and resetting an atomic_t stat
  * variable through read/write to a proc file. Any write to the file
@@ -230,7 +228,6 @@ static struct ctl_table svcrdma_root_table[] = {
 void svc_rdma_cleanup(void)
 {
        dprintk("SVCRDMA Module Removed, deregister RPC RDMA transport\n");
-       destroy_workqueue(svc_rdma_wq);
        if (svcrdma_table_header) {
                unregister_sysctl_table(svcrdma_table_header);
                svcrdma_table_header = NULL;
@@ -246,10 +243,6 @@ int svc_rdma_init(void)
        dprintk("\tmax_bc_requests  : %u\n", svcrdma_max_bc_requests);
        dprintk("\tmax_inline       : %d\n", svcrdma_max_req_size);
 
-       svc_rdma_wq = alloc_workqueue("svc_rdma", 0, 0);
-       if (!svc_rdma_wq)
-               return -ENOMEM;
-
        if (!svcrdma_table_header)
                svcrdma_table_header =
                        register_sysctl_table(svcrdma_root_table);
index 3fe665152d954a650cd01751cabbe548a0a24d0e..18d6eb3686e7fceae1d39a6c719dbc9bf3da4b24 100644 (file)
@@ -630,8 +630,9 @@ static void svc_rdma_free(struct svc_xprt *xprt)
 {
        struct svcxprt_rdma *rdma =
                container_of(xprt, struct svcxprt_rdma, sc_xprt);
+
        INIT_WORK(&rdma->sc_work, __svc_rdma_free);
-       queue_work(svc_rdma_wq, &rdma->sc_work);
+       schedule_work(&rdma->sc_work);
 }
 
 static int svc_rdma_has_wspace(struct svc_xprt *xprt)