svcrdma: Fix incorrect return value/type in svc_rdma_post_recvs
diff mbox

Message ID 20180514172006.2217.10418.stgit@klimt.1015granger.net
State New
Headers show

Commit Message

Chuck Lever May 14, 2018, 5:20 p.m. UTC
This crept in during the development process and wasn't caught
before I posted the "final" version.

Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
Fixes: 0b2613c5883f ('svcrdma: Allocate recv_ctxt's on CPU ... ')
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
---
 net/sunrpc/xprtrdma/svc_rdma_recvfrom.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Comments

J. Bruce Fields May 16, 2018, 6:15 p.m. UTC | #1
Thanks!

--b.

On Mon, May 14, 2018 at 01:20:06PM -0400, Chuck Lever wrote:
> This crept in during the development process and wasn't caught
> before I posted the "final" version.
> 
> Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
> Fixes: 0b2613c5883f ('svcrdma: Allocate recv_ctxt's on CPU ... ')
> Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
> ---
>  net/sunrpc/xprtrdma/svc_rdma_recvfrom.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
> index 09ce09b..841fca1 100644
> --- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
> +++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
> @@ -270,7 +270,7 @@ bool svc_rdma_post_recvs(struct svcxprt_rdma *rdma)
>  	for (i = 0; i < rdma->sc_max_requests; i++) {
>  		ctxt = svc_rdma_recv_ctxt_get(rdma);
>  		if (!ctxt)
> -			return -ENOMEM;
> +			return false;
>  		ctxt->rc_temp = true;
>  		ret = __svc_rdma_post_recv(rdma, ctxt);
>  		if (ret) {
--
To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Patch
diff mbox

diff --git a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
index 09ce09b..841fca1 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
@@ -270,7 +270,7 @@  bool svc_rdma_post_recvs(struct svcxprt_rdma *rdma)
 	for (i = 0; i < rdma->sc_max_requests; i++) {
 		ctxt = svc_rdma_recv_ctxt_get(rdma);
 		if (!ctxt)
-			return -ENOMEM;
+			return false;
 		ctxt->rc_temp = true;
 		ret = __svc_rdma_post_recv(rdma, ctxt);
 		if (ret) {