diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/sunrpc/svc_xprt.c | 2 | ||||
-rw-r--r-- | net/sunrpc/svcsock.c | 6 |
2 files changed, 4 insertions, 4 deletions
diff --git a/net/sunrpc/svc_xprt.c b/net/sunrpc/svc_xprt.c index ee15663798b3..3e317307e288 100644 --- a/net/sunrpc/svc_xprt.c +++ b/net/sunrpc/svc_xprt.c | |||
@@ -743,7 +743,7 @@ int svc_recv(struct svc_rqst *rqstp, long timeout) | |||
743 | svc_xprt_received(xprt); | 743 | svc_xprt_received(xprt); |
744 | 744 | ||
745 | /* No data, incomplete (TCP) read, or accept() */ | 745 | /* No data, incomplete (TCP) read, or accept() */ |
746 | if (len == 0 || len == -EAGAIN) | 746 | if (len <= 0) |
747 | goto out; | 747 | goto out; |
748 | 748 | ||
749 | clear_bit(XPT_OLD, &xprt->xpt_flags); | 749 | clear_bit(XPT_OLD, &xprt->xpt_flags); |
diff --git a/net/sunrpc/svcsock.c b/net/sunrpc/svcsock.c index 406688baac57..7aee54c3fe46 100644 --- a/net/sunrpc/svcsock.c +++ b/net/sunrpc/svcsock.c | |||
@@ -598,7 +598,7 @@ static int svc_udp_recvfrom(struct svc_rqst *rqstp) | |||
598 | dprintk("svc: recvfrom returned error %d\n", -err); | 598 | dprintk("svc: recvfrom returned error %d\n", -err); |
599 | set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags); | 599 | set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags); |
600 | } | 600 | } |
601 | return -EAGAIN; | 601 | return 0; |
602 | } | 602 | } |
603 | len = svc_addr_len(svc_addr(rqstp)); | 603 | len = svc_addr_len(svc_addr(rqstp)); |
604 | rqstp->rq_addrlen = len; | 604 | rqstp->rq_addrlen = len; |
@@ -1174,13 +1174,13 @@ error: | |||
1174 | if (len != -EAGAIN) | 1174 | if (len != -EAGAIN) |
1175 | goto err_other; | 1175 | goto err_other; |
1176 | dprintk("RPC: TCP recvfrom got EAGAIN\n"); | 1176 | dprintk("RPC: TCP recvfrom got EAGAIN\n"); |
1177 | return -EAGAIN; | 1177 | return 0; |
1178 | err_other: | 1178 | err_other: |
1179 | printk(KERN_NOTICE "%s: recvfrom returned errno %d\n", | 1179 | printk(KERN_NOTICE "%s: recvfrom returned errno %d\n", |
1180 | svsk->sk_xprt.xpt_server->sv_name, -len); | 1180 | svsk->sk_xprt.xpt_server->sv_name, -len); |
1181 | set_bit(XPT_CLOSE, &svsk->sk_xprt.xpt_flags); | 1181 | set_bit(XPT_CLOSE, &svsk->sk_xprt.xpt_flags); |
1182 | err_noclose: | 1182 | err_noclose: |
1183 | return -EAGAIN; /* record not complete */ | 1183 | return 0; /* record not complete */ |
1184 | } | 1184 | } |
1185 | 1185 | ||
1186 | /* | 1186 | /* |