Commit 9f9d2ebe693a98d517257e1a39f61120b4473b96
1 parent
af6d572134
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
svcrpc: make xpo_recvfrom return only >=0
The only errors returned from xpo_recvfrom have been -EAGAIN and -EAFNOSUPPORT. The latter was removed by a previous patch. That leaves only -EAGAIN, which is treated just like 0 by the caller (svc_recv). So, just ditch -EAGAIN and return 0 instead. Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Showing 2 changed files with 4 additions and 4 deletions Side-by-side Diff
net/sunrpc/svc_xprt.c
net/sunrpc/svcsock.c
... | ... | @@ -598,7 +598,7 @@ |
598 | 598 | dprintk("svc: recvfrom returned error %d\n", -err); |
599 | 599 | set_bit(XPT_DATA, &svsk->sk_xprt.xpt_flags); |
600 | 600 | } |
601 | - return -EAGAIN; | |
601 | + return 0; | |
602 | 602 | } |
603 | 603 | len = svc_addr_len(svc_addr(rqstp)); |
604 | 604 | rqstp->rq_addrlen = len; |
605 | 605 | |
... | ... | @@ -1174,13 +1174,13 @@ |
1174 | 1174 | if (len != -EAGAIN) |
1175 | 1175 | goto err_other; |
1176 | 1176 | dprintk("RPC: TCP recvfrom got EAGAIN\n"); |
1177 | - return -EAGAIN; | |
1177 | + return 0; | |
1178 | 1178 | err_other: |
1179 | 1179 | printk(KERN_NOTICE "%s: recvfrom returned errno %d\n", |
1180 | 1180 | svsk->sk_xprt.xpt_server->sv_name, -len); |
1181 | 1181 | set_bit(XPT_CLOSE, &svsk->sk_xprt.xpt_flags); |
1182 | 1182 | err_noclose: |
1183 | - return -EAGAIN; /* record not complete */ | |
1183 | + return 0; /* record not complete */ | |
1184 | 1184 | } |
1185 | 1185 | |
1186 | 1186 | /* |