mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-03-30 10:55:03 +00:00
SUNRPC: Don't hold the transport lock when receiving backchannel data
The backchannel request has no associated task, so it is going nowhere until we call xprt_complete_bc_request(). Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
This commit is contained in:
parent
729749bb8d
commit
c89091c88d
2 changed files with 3 additions and 6 deletions
|
@ -171,10 +171,10 @@ int xprt_setup_bc(struct rpc_xprt *xprt, unsigned int min_reqs)
|
||||||
/*
|
/*
|
||||||
* Add the temporary list to the backchannel preallocation list
|
* Add the temporary list to the backchannel preallocation list
|
||||||
*/
|
*/
|
||||||
spin_lock_bh(&xprt->bc_pa_lock);
|
spin_lock(&xprt->bc_pa_lock);
|
||||||
list_splice(&tmp_list, &xprt->bc_pa_list);
|
list_splice(&tmp_list, &xprt->bc_pa_list);
|
||||||
xprt_inc_alloc_count(xprt, min_reqs);
|
xprt_inc_alloc_count(xprt, min_reqs);
|
||||||
spin_unlock_bh(&xprt->bc_pa_lock);
|
spin_unlock(&xprt->bc_pa_lock);
|
||||||
|
|
||||||
dprintk("RPC: setup backchannel transport done\n");
|
dprintk("RPC: setup backchannel transport done\n");
|
||||||
return 0;
|
return 0;
|
||||||
|
|
|
@ -1389,11 +1389,9 @@ static int xs_tcp_read_callback(struct rpc_xprt *xprt,
|
||||||
container_of(xprt, struct sock_xprt, xprt);
|
container_of(xprt, struct sock_xprt, xprt);
|
||||||
struct rpc_rqst *req;
|
struct rpc_rqst *req;
|
||||||
|
|
||||||
/* Look up and lock the request corresponding to the given XID */
|
/* Look up the request corresponding to the given XID */
|
||||||
spin_lock_bh(&xprt->transport_lock);
|
|
||||||
req = xprt_lookup_bc_request(xprt, transport->tcp_xid);
|
req = xprt_lookup_bc_request(xprt, transport->tcp_xid);
|
||||||
if (req == NULL) {
|
if (req == NULL) {
|
||||||
spin_unlock_bh(&xprt->transport_lock);
|
|
||||||
printk(KERN_WARNING "Callback slot table overflowed\n");
|
printk(KERN_WARNING "Callback slot table overflowed\n");
|
||||||
xprt_force_disconnect(xprt);
|
xprt_force_disconnect(xprt);
|
||||||
return -1;
|
return -1;
|
||||||
|
@ -1404,7 +1402,6 @@ static int xs_tcp_read_callback(struct rpc_xprt *xprt,
|
||||||
|
|
||||||
if (!(transport->tcp_flags & TCP_RCV_COPY_DATA))
|
if (!(transport->tcp_flags & TCP_RCV_COPY_DATA))
|
||||||
xprt_complete_bc_request(req, transport->tcp_copied);
|
xprt_complete_bc_request(req, transport->tcp_copied);
|
||||||
spin_unlock_bh(&xprt->transport_lock);
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue