]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
svcrdma: Squelch disconnection messages
authorChuck Lever <chuck.lever@oracle.com>
Fri, 23 Jun 2017 21:17:15 +0000 (17:17 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Wed, 28 Jun 2017 18:21:43 +0000 (14:21 -0400)
The server displays "svcrdma: failed to post Send WR (-107)" in the
kernel log when the client disconnects. This could flood the server's
log, so remove the message.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
net/sunrpc/xprtrdma/svc_rdma_sendto.c

index 1736337f3a557a68399f5d1b103822cc08d19562..5ba6d915c9067ba1d32036368407499b0595967e 100644 (file)
@@ -313,13 +313,17 @@ static int svc_rdma_dma_map_buf(struct svcxprt_rdma *rdma,
        dma_addr = ib_dma_map_page(dev, virt_to_page(base),
                                   offset, len, DMA_TO_DEVICE);
        if (ib_dma_mapping_error(dev, dma_addr))
-               return -EIO;
+               goto out_maperr;
 
        ctxt->sge[sge_no].addr = dma_addr;
        ctxt->sge[sge_no].length = len;
        ctxt->sge[sge_no].lkey = rdma->sc_pd->local_dma_lkey;
        svc_rdma_count_mappings(rdma, ctxt);
        return 0;
+
+out_maperr:
+       pr_err("svcrdma: failed to map buffer\n");
+       return -EIO;
 }
 
 static int svc_rdma_dma_map_page(struct svcxprt_rdma *rdma,
@@ -334,13 +338,17 @@ static int svc_rdma_dma_map_page(struct svcxprt_rdma *rdma,
 
        dma_addr = ib_dma_map_page(dev, page, offset, len, DMA_TO_DEVICE);
        if (ib_dma_mapping_error(dev, dma_addr))
-               return -EIO;
+               goto out_maperr;
 
        ctxt->sge[sge_no].addr = dma_addr;
        ctxt->sge[sge_no].length = len;
        ctxt->sge[sge_no].lkey = rdma->sc_pd->local_dma_lkey;
        svc_rdma_count_mappings(rdma, ctxt);
        return 0;
+
+out_maperr:
+       pr_err("svcrdma: failed to map page\n");
+       return -EIO;
 }
 
 /**
@@ -547,7 +555,6 @@ static int svc_rdma_send_reply_msg(struct svcxprt_rdma *rdma,
        return 0;
 
 err:
-       pr_err("svcrdma: failed to post Send WR (%d)\n", ret);
        svc_rdma_unmap_dma(ctxt);
        svc_rdma_put_context(ctxt, 1);
        return ret;