]> err.no Git - linux-2.6/commitdiff
svcrdma: Change svc_rdma_send_error return type to void
authorTom Tucker <tom@opengridcomputing.com>
Wed, 7 May 2008 20:47:42 +0000 (15:47 -0500)
committerTom Tucker <tom@opengridcomputing.com>
Mon, 19 May 2008 12:34:01 +0000 (07:34 -0500)
The svc_rdma_send_error function is called when an RPCRDMA protocol
error is detected. This function attempts to post an error reply message.
Since an error posting to a transport in error is ignored, change
the return type to void.

Signed-off-by: Tom Tucker <tom@opengridcomputing.com>
include/linux/sunrpc/svc_rdma.h
net/sunrpc/xprtrdma/svc_rdma_recvfrom.c
net/sunrpc/xprtrdma/svc_rdma_transport.c

index f5f15ae2438b8b452e91b28ff5bc4ce7343176c8..05eb4664d0dd9257c405a9547084d253b993f4e1 100644 (file)
@@ -166,8 +166,8 @@ extern int svc_rdma_sendto(struct svc_rqst *);
 
 /* svc_rdma_transport.c */
 extern int svc_rdma_send(struct svcxprt_rdma *, struct ib_send_wr *);
-extern int svc_rdma_send_error(struct svcxprt_rdma *, struct rpcrdma_msg *,
-                              enum rpcrdma_errcode);
+extern void svc_rdma_send_error(struct svcxprt_rdma *, struct rpcrdma_msg *,
+                               enum rpcrdma_errcode);
 struct page *svc_rdma_get_page(void);
 extern int svc_rdma_post_recv(struct svcxprt_rdma *);
 extern int svc_rdma_create_listen(struct svc_serv *, int, struct sockaddr *);
index c016f5ca0ce5b644929f8405e9b65c8d4b9d8ab6..6b16d8cd5682481d92a2357ea3a03c7c4af1f2b3 100644 (file)
@@ -497,7 +497,7 @@ int svc_rdma_recvfrom(struct svc_rqst *rqstp)
        /* If the request is invalid, reply with an error */
        if (len < 0) {
                if (len == -ENOSYS)
-                       (void)svc_rdma_send_error(rdma_xprt, rmsgp, ERR_VERS);
+                       svc_rdma_send_error(rdma_xprt, rmsgp, ERR_VERS);
                goto close_out;
        }
 
index c7545203f4b3be4b5df5b2151f9151411a9465e5..e132509d1db06285e6af8695c0e5171db0d9f766 100644 (file)
@@ -1114,8 +1114,8 @@ int svc_rdma_send(struct svcxprt_rdma *xprt, struct ib_send_wr *wr)
        return ret;
 }
 
-int svc_rdma_send_error(struct svcxprt_rdma *xprt, struct rpcrdma_msg *rmsgp,
-                       enum rpcrdma_errcode err)
+void svc_rdma_send_error(struct svcxprt_rdma *xprt, struct rpcrdma_msg *rmsgp,
+                        enum rpcrdma_errcode err)
 {
        struct ib_send_wr err_wr;
        struct ib_sge sge;
@@ -1153,9 +1153,8 @@ int svc_rdma_send_error(struct svcxprt_rdma *xprt, struct rpcrdma_msg *rmsgp,
        /* Post It */
        ret = svc_rdma_send(xprt, &err_wr);
        if (ret) {
-               dprintk("svcrdma: Error posting send = %d\n", ret);
+               dprintk("svcrdma: Error %d posting send for protocol error\n",
+                       ret);
                svc_rdma_put_context(ctxt, 1);
        }
-
-       return ret;
 }