提交 b20dae70 编写于 作者: C Colin Ian King 提交者: J. Bruce Fields

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: 107c1d0a ("svcrdma: Avoid Send Queue overflow")
Signed-off-by: NColin Ian King <colin.king@canonical.com>
Reviewed-by: NChuck Lever <chuck.lever@oracle.com>
Signed-off-by: NJ. Bruce Fields <bfields@redhat.com>
上级 630458e7
...@@ -684,7 +684,7 @@ int svc_rdma_sendto(struct svc_rqst *rqstp) ...@@ -684,7 +684,7 @@ int svc_rdma_sendto(struct svc_rqst *rqstp)
return 0; return 0;
err2: err2:
if (ret != -E2BIG || ret != -EINVAL) if (ret != -E2BIG && ret != -EINVAL)
goto err1; goto err1;
ret = svc_rdma_post_recv(rdma, GFP_KERNEL); ret = svc_rdma_post_recv(rdma, GFP_KERNEL);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册