summaryrefslogtreecommitdiffstats
path: root/net/sunrpc
diff options
context:
space:
mode:
authorColin Ian King <colin.king@canonical.com>2017-07-13 18:51:15 +0100
committerJ. Bruce Fields <bfields@redhat.com>2017-07-13 14:18:47 -0400
commitb20dae70bfa5014fdf201d0a8589271b888e4927 (patch)
tree808a435f0329f3547a468bf2d03583b72119e2c9 /net/sunrpc
parent630458e730b82efe1f6eb90e6bcabad02fe76e20 (diff)
downloadlinux-b20dae70bfa5014fdf201d0a8589271b888e4927.tar.bz2
svcrdma: fix an incorrect check on -E2BIG and -EINVAL
The current check will always be true and will always jump to err1, this looks dubious to me. I believe && should be used instead of ||. Detected by CoverityScan, CID#1450120 ("Logically Dead Code") Fixes: 107c1d0a991a ("svcrdma: Avoid Send Queue overflow") Signed-off-by: Colin Ian King <colin.king@canonical.com> Reviewed-by: Chuck Lever <chuck.lever@oracle.com> Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r--net/sunrpc/xprtrdma/svc_rdma_sendto.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/sunrpc/xprtrdma/svc_rdma_sendto.c b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
index 19fd01e4b690..7c3a211e0e9a 100644
--- a/net/sunrpc/xprtrdma/svc_rdma_sendto.c
+++ b/net/sunrpc/xprtrdma/svc_rdma_sendto.c
@@ -684,7 +684,7 @@ int svc_rdma_sendto(struct svc_rqst *rqstp)
return 0;
err2:
- if (ret != -E2BIG || ret != -EINVAL)
+ if (ret != -E2BIG && ret != -EINVAL)
goto err1;
ret = svc_rdma_post_recv(rdma, GFP_KERNEL);