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>
This commit is contained in:
@@ -743,7 +743,7 @@ int svc_recv(struct svc_rqst *rqstp, long timeout)
|
||||
svc_xprt_received(xprt);
|
||||
|
||||
/* No data, incomplete (TCP) read, or accept() */
|
||||
if (len == 0 || len == -EAGAIN)
|
||||
if (len <= 0)
|
||||
goto out;
|
||||
|
||||
clear_bit(XPT_OLD, &xprt->xpt_flags);
|
||||
|
مرجع در شماره جدید
Block a user