SUNRPC: Get rid of the redundant xprt->shutdown bit field
It is only set after everyone has dereferenced the transport, and serves no useful purpose: setting it is racy, so all the socket code, etc still needs to be able to cope with the cases where they miss reading it. Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
@@ -917,9 +917,6 @@ static void xs_local_data_ready(struct sock *sk, int len)
|
||||
if (skb == NULL)
|
||||
goto out;
|
||||
|
||||
if (xprt->shutdown)
|
||||
goto dropit;
|
||||
|
||||
repsize = skb->len - sizeof(rpc_fraghdr);
|
||||
if (repsize < 4) {
|
||||
dprintk("RPC: impossible RPC reply size %d\n", repsize);
|
||||
@@ -981,9 +978,6 @@ static void xs_udp_data_ready(struct sock *sk, int len)
|
||||
if ((skb = skb_recv_datagram(sk, 0, 1, &err)) == NULL)
|
||||
goto out;
|
||||
|
||||
if (xprt->shutdown)
|
||||
goto dropit;
|
||||
|
||||
repsize = skb->len - sizeof(struct udphdr);
|
||||
if (repsize < 4) {
|
||||
dprintk("RPC: impossible RPC reply size %d!\n", repsize);
|
||||
@@ -1412,9 +1406,6 @@ static void xs_tcp_data_ready(struct sock *sk, int bytes)
|
||||
read_lock_bh(&sk->sk_callback_lock);
|
||||
if (!(xprt = xprt_from_sock(sk)))
|
||||
goto out;
|
||||
if (xprt->shutdown)
|
||||
goto out;
|
||||
|
||||
/* Any data means we had a useful conversation, so
|
||||
* the we don't need to delay the next reconnect
|
||||
*/
|
||||
@@ -1901,9 +1892,6 @@ static void xs_local_setup_socket(struct work_struct *work)
|
||||
struct socket *sock;
|
||||
int status = -EIO;
|
||||
|
||||
if (xprt->shutdown)
|
||||
goto out;
|
||||
|
||||
current->flags |= PF_FSTRANS;
|
||||
|
||||
clear_bit(XPRT_CONNECTION_ABORT, &xprt->state);
|
||||
@@ -2020,9 +2008,6 @@ static void xs_udp_setup_socket(struct work_struct *work)
|
||||
struct socket *sock = transport->sock;
|
||||
int status = -EIO;
|
||||
|
||||
if (xprt->shutdown)
|
||||
goto out;
|
||||
|
||||
current->flags |= PF_FSTRANS;
|
||||
|
||||
/* Start by resetting any existing state */
|
||||
@@ -2168,9 +2153,6 @@ static void xs_tcp_setup_socket(struct work_struct *work)
|
||||
struct rpc_xprt *xprt = &transport->xprt;
|
||||
int status = -EIO;
|
||||
|
||||
if (xprt->shutdown)
|
||||
goto out;
|
||||
|
||||
current->flags |= PF_FSTRANS;
|
||||
|
||||
if (!sock) {
|
||||
|
Reference in New Issue
Block a user