Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b20dae70 authored by Colin Ian King's avatar Colin Ian King Committed by J. Bruce Fields
Browse files

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: default avatarColin Ian King <colin.king@canonical.com>
Reviewed-by: default avatarChuck Lever <chuck.lever@oracle.com>
Signed-off-by: default avatarJ. Bruce Fields <bfields@redhat.com>
parent 630458e7
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);