diff options
author | David S. Miller <davem@davemloft.net> | 2017-10-30 01:10:01 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-10-30 08:09:24 -0400 |
commit | e1ea2f9856b765a2eaabb403a6751f70efc9ba4c (patch) | |
tree | 771f0f96fdab1b27757730e96d911c73f5499ee4 /net/sunrpc | |
parent | aad93c70b9a3b80dbc383a31e77a119f69bdd856 (diff) | |
parent | 0b07194bb55ed836c2cc7c22e866b87a14681984 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Several conflicts here.
NFP driver bug fix adding nfp_netdev_is_nfp_repr() check to
nfp_fl_output() needed some adjustments because the code block is in
an else block now.
Parallel additions to net/pkt_cls.h and net/sch_generic.h
A bug fix in __tcp_retransmit_skb() conflicted with some of
the rbtree changes in net-next.
The tc action RCU callback fixes in 'net' had some overlap with some
of the recent tcf_block reworking.
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/xprt.c | 36 |
1 files changed, 25 insertions, 11 deletions
diff --git a/net/sunrpc/xprt.c b/net/sunrpc/xprt.c index 4b00302e1867..6160d17a31c4 100644 --- a/net/sunrpc/xprt.c +++ b/net/sunrpc/xprt.c | |||
@@ -1333,7 +1333,7 @@ void xprt_release(struct rpc_task *task) | |||
1333 | rpc_count_iostats(task, task->tk_client->cl_metrics); | 1333 | rpc_count_iostats(task, task->tk_client->cl_metrics); |
1334 | spin_lock(&xprt->recv_lock); | 1334 | spin_lock(&xprt->recv_lock); |
1335 | if (!list_empty(&req->rq_list)) { | 1335 | if (!list_empty(&req->rq_list)) { |
1336 | list_del(&req->rq_list); | 1336 | list_del_init(&req->rq_list); |
1337 | xprt_wait_on_pinned_rqst(req); | 1337 | xprt_wait_on_pinned_rqst(req); |
1338 | } | 1338 | } |
1339 | spin_unlock(&xprt->recv_lock); | 1339 | spin_unlock(&xprt->recv_lock); |
@@ -1444,6 +1444,23 @@ out: | |||
1444 | return xprt; | 1444 | return xprt; |
1445 | } | 1445 | } |
1446 | 1446 | ||
1447 | static void xprt_destroy_cb(struct work_struct *work) | ||
1448 | { | ||
1449 | struct rpc_xprt *xprt = | ||
1450 | container_of(work, struct rpc_xprt, task_cleanup); | ||
1451 | |||
1452 | rpc_xprt_debugfs_unregister(xprt); | ||
1453 | rpc_destroy_wait_queue(&xprt->binding); | ||
1454 | rpc_destroy_wait_queue(&xprt->pending); | ||
1455 | rpc_destroy_wait_queue(&xprt->sending); | ||
1456 | rpc_destroy_wait_queue(&xprt->backlog); | ||
1457 | kfree(xprt->servername); | ||
1458 | /* | ||
1459 | * Tear down transport state and free the rpc_xprt | ||
1460 | */ | ||
1461 | xprt->ops->destroy(xprt); | ||
1462 | } | ||
1463 | |||
1447 | /** | 1464 | /** |
1448 | * xprt_destroy - destroy an RPC transport, killing off all requests. | 1465 | * xprt_destroy - destroy an RPC transport, killing off all requests. |
1449 | * @xprt: transport to destroy | 1466 | * @xprt: transport to destroy |
@@ -1453,22 +1470,19 @@ static void xprt_destroy(struct rpc_xprt *xprt) | |||
1453 | { | 1470 | { |
1454 | dprintk("RPC: destroying transport %p\n", xprt); | 1471 | dprintk("RPC: destroying transport %p\n", xprt); |
1455 | 1472 | ||
1456 | /* Exclude transport connect/disconnect handlers */ | 1473 | /* |
1474 | * Exclude transport connect/disconnect handlers and autoclose | ||
1475 | */ | ||
1457 | wait_on_bit_lock(&xprt->state, XPRT_LOCKED, TASK_UNINTERRUPTIBLE); | 1476 | wait_on_bit_lock(&xprt->state, XPRT_LOCKED, TASK_UNINTERRUPTIBLE); |
1458 | 1477 | ||
1459 | del_timer_sync(&xprt->timer); | 1478 | del_timer_sync(&xprt->timer); |
1460 | 1479 | ||
1461 | rpc_xprt_debugfs_unregister(xprt); | ||
1462 | rpc_destroy_wait_queue(&xprt->binding); | ||
1463 | rpc_destroy_wait_queue(&xprt->pending); | ||
1464 | rpc_destroy_wait_queue(&xprt->sending); | ||
1465 | rpc_destroy_wait_queue(&xprt->backlog); | ||
1466 | cancel_work_sync(&xprt->task_cleanup); | ||
1467 | kfree(xprt->servername); | ||
1468 | /* | 1480 | /* |
1469 | * Tear down transport state and free the rpc_xprt | 1481 | * Destroy sockets etc from the system workqueue so they can |
1482 | * safely flush receive work running on rpciod. | ||
1470 | */ | 1483 | */ |
1471 | xprt->ops->destroy(xprt); | 1484 | INIT_WORK(&xprt->task_cleanup, xprt_destroy_cb); |
1485 | schedule_work(&xprt->task_cleanup); | ||
1472 | } | 1486 | } |
1473 | 1487 | ||
1474 | static void xprt_destroy_kref(struct kref *kref) | 1488 | static void xprt_destroy_kref(struct kref *kref) |