diff options
author | David S. Miller <davem@davemloft.net> | 2011-12-02 13:49:21 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-12-02 13:49:21 -0500 |
commit | b3613118eb30a589d971e4eccbbb2a1314f5dfd4 (patch) | |
tree | 868c1ee59e1b5c19a4f2e43716400d0001a994e5 /net/sunrpc/xprtsock.c | |
parent | 7505afe28c16a8d386624930a018d0052c75d687 (diff) | |
parent | 5983fe2b29df5885880d7fa3b91aca306c7564ef (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'net/sunrpc/xprtsock.c')
-rw-r--r-- | net/sunrpc/xprtsock.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index d7f97ef26590..55472c48825e 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c | |||
@@ -496,7 +496,7 @@ static int xs_nospace(struct rpc_task *task) | |||
496 | struct rpc_rqst *req = task->tk_rqstp; | 496 | struct rpc_rqst *req = task->tk_rqstp; |
497 | struct rpc_xprt *xprt = req->rq_xprt; | 497 | struct rpc_xprt *xprt = req->rq_xprt; |
498 | struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); | 498 | struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt); |
499 | int ret = 0; | 499 | int ret = -EAGAIN; |
500 | 500 | ||
501 | dprintk("RPC: %5u xmit incomplete (%u left of %u)\n", | 501 | dprintk("RPC: %5u xmit incomplete (%u left of %u)\n", |
502 | task->tk_pid, req->rq_slen - req->rq_bytes_sent, | 502 | task->tk_pid, req->rq_slen - req->rq_bytes_sent, |
@@ -508,7 +508,6 @@ static int xs_nospace(struct rpc_task *task) | |||
508 | /* Don't race with disconnect */ | 508 | /* Don't race with disconnect */ |
509 | if (xprt_connected(xprt)) { | 509 | if (xprt_connected(xprt)) { |
510 | if (test_bit(SOCK_ASYNC_NOSPACE, &transport->sock->flags)) { | 510 | if (test_bit(SOCK_ASYNC_NOSPACE, &transport->sock->flags)) { |
511 | ret = -EAGAIN; | ||
512 | /* | 511 | /* |
513 | * Notify TCP that we're limited by the application | 512 | * Notify TCP that we're limited by the application |
514 | * window size | 513 | * window size |
@@ -2530,8 +2529,10 @@ static struct rpc_xprt *xs_setup_xprt(struct xprt_create *args, | |||
2530 | int err; | 2529 | int err; |
2531 | err = xs_init_anyaddr(args->dstaddr->sa_family, | 2530 | err = xs_init_anyaddr(args->dstaddr->sa_family, |
2532 | (struct sockaddr *)&new->srcaddr); | 2531 | (struct sockaddr *)&new->srcaddr); |
2533 | if (err != 0) | 2532 | if (err != 0) { |
2533 | xprt_free(xprt); | ||
2534 | return ERR_PTR(err); | 2534 | return ERR_PTR(err); |
2535 | } | ||
2535 | } | 2536 | } |
2536 | 2537 | ||
2537 | return xprt; | 2538 | return xprt; |