Skip to content

Commit d6dfe43

Browse files
chuckleverJ. Bruce Fields
authored andcommitted
svcrdma: Remove svc_rdma_wq
Clean up: the system workqueue will work just as well. Signed-off-by: Chuck Lever <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
1 parent 10fa8ac commit d6dfe43

File tree

3 files changed

+2
-9
lines changed

3 files changed

+2
-9
lines changed

include/linux/sunrpc/svc_rdma.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,7 +200,6 @@ extern struct svc_xprt_class svc_rdma_bc_class;
200200
#endif
201201

202202
/* svc_rdma.c */
203-
extern struct workqueue_struct *svc_rdma_wq;
204203
extern int svc_rdma_init(void);
205204
extern void svc_rdma_cleanup(void);
206205

net/sunrpc/xprtrdma/svc_rdma.c

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,6 @@ atomic_t rdma_stat_rq_prod;
7373
atomic_t rdma_stat_sq_poll;
7474
atomic_t rdma_stat_sq_prod;
7575

76-
struct workqueue_struct *svc_rdma_wq;
77-
7876
/*
7977
* This function implements reading and resetting an atomic_t stat
8078
* variable through read/write to a proc file. Any write to the file
@@ -230,7 +228,6 @@ static struct ctl_table svcrdma_root_table[] = {
230228
void svc_rdma_cleanup(void)
231229
{
232230
dprintk("SVCRDMA Module Removed, deregister RPC RDMA transport\n");
233-
destroy_workqueue(svc_rdma_wq);
234231
if (svcrdma_table_header) {
235232
unregister_sysctl_table(svcrdma_table_header);
236233
svcrdma_table_header = NULL;
@@ -246,10 +243,6 @@ int svc_rdma_init(void)
246243
dprintk("\tmax_bc_requests : %u\n", svcrdma_max_bc_requests);
247244
dprintk("\tmax_inline : %d\n", svcrdma_max_req_size);
248245

249-
svc_rdma_wq = alloc_workqueue("svc_rdma", 0, 0);
250-
if (!svc_rdma_wq)
251-
return -ENOMEM;
252-
253246
if (!svcrdma_table_header)
254247
svcrdma_table_header =
255248
register_sysctl_table(svcrdma_root_table);

net/sunrpc/xprtrdma/svc_rdma_transport.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,8 +630,9 @@ static void svc_rdma_free(struct svc_xprt *xprt)
630630
{
631631
struct svcxprt_rdma *rdma =
632632
container_of(xprt, struct svcxprt_rdma, sc_xprt);
633+
633634
INIT_WORK(&rdma->sc_work, __svc_rdma_free);
634-
queue_work(svc_rdma_wq, &rdma->sc_work);
635+
schedule_work(&rdma->sc_work);
635636
}
636637

637638
static int svc_rdma_has_wspace(struct svc_xprt *xprt)

0 commit comments

Comments
 (0)