Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 132306
b: refs/heads/master
c: 01d37c4
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Mar 11, 2009
1 parent 5a5e8f4 commit a95bf78
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: fba91afbec2c004e2c8733ae9e0ca6998e962c64
refs/heads/master: 01d37c428ae080563c0a3bb8bdfa88c65a6891d3
2 changes: 1 addition & 1 deletion trunk/net/sunrpc/xprt.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ void xprt_connect(struct rpc_task *task)
xprt, (xprt_connected(xprt) ? "is" : "is not"));

if (!xprt_bound(xprt)) {
task->tk_status = -EIO;
task->tk_status = -EAGAIN;
return;
}
if (!xprt_lock_write(xprt, task))
Expand Down
13 changes: 9 additions & 4 deletions trunk/net/sunrpc/xprtsock.c
Original file line number Diff line number Diff line change
Expand Up @@ -577,6 +577,8 @@ static int xs_udp_send_request(struct rpc_task *task)
req->rq_svec->iov_base,
req->rq_svec->iov_len);

if (!xprt_bound(xprt))
return -ENOTCONN;
status = xs_sendpages(transport->sock,
xs_addr(xprt),
xprt->addrlen, xdr,
Expand Down Expand Up @@ -1531,7 +1533,7 @@ static void xs_udp_connect_worker4(struct work_struct *work)
struct socket *sock = transport->sock;
int err, status = -EIO;

if (xprt->shutdown || !xprt_bound(xprt))
if (xprt->shutdown)
goto out;

/* Start by resetting any existing state */
Expand Down Expand Up @@ -1572,7 +1574,7 @@ static void xs_udp_connect_worker6(struct work_struct *work)
struct socket *sock = transport->sock;
int err, status = -EIO;

if (xprt->shutdown || !xprt_bound(xprt))
if (xprt->shutdown)
goto out;

/* Start by resetting any existing state */
Expand Down Expand Up @@ -1656,6 +1658,9 @@ static int xs_tcp_finish_connecting(struct rpc_xprt *xprt, struct socket *sock)
write_unlock_bh(&sk->sk_callback_lock);
}

if (!xprt_bound(xprt))
return -ENOTCONN;

/* Tell the socket layer to start connecting... */
xprt->stat.connect_count++;
xprt->stat.connect_start = jiffies;
Expand All @@ -1676,7 +1681,7 @@ static void xs_tcp_connect_worker4(struct work_struct *work)
struct socket *sock = transport->sock;
int err, status = -EIO;

if (xprt->shutdown || !xprt_bound(xprt))
if (xprt->shutdown)
goto out;

if (!sock) {
Expand Down Expand Up @@ -1736,7 +1741,7 @@ static void xs_tcp_connect_worker6(struct work_struct *work)
struct socket *sock = transport->sock;
int err, status = -EIO;

if (xprt->shutdown || !xprt_bound(xprt))
if (xprt->shutdown)
goto out;

if (!sock) {
Expand Down

0 comments on commit a95bf78

Please sign in to comment.