]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
xprtrdma: Remove rpclen from rpcrdma_marshal_req
authorChuck Lever <chuck.lever@oracle.com>
Thu, 10 Aug 2017 16:47:20 +0000 (12:47 -0400)
committerAnna Schumaker <Anna.Schumaker@Netapp.com>
Fri, 11 Aug 2017 17:20:08 +0000 (13:20 -0400)
Clean up: Remove a variable whose result is no longer used.
Commit 655fec6987be ("xprtrdma: Use gathered Send for large inline
messages") should have removed it.

Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
net/sunrpc/xprtrdma/rpc_rdma.c

index d916e596d4275010b33654afcd2828e7b7179ad5..f1d63ac9d7c71848d651569f02210bb01bc68eb6 100644 (file)
@@ -677,7 +677,6 @@ rpcrdma_marshal_req(struct rpcrdma_xprt *r_xprt, struct rpc_rqst *rqst)
        struct rpcrdma_msg *headerp;
        bool ddp_allowed;
        ssize_t hdrlen;
-       size_t rpclen;
        __be32 *iptr;
 
 #if defined(CONFIG_SUNRPC_BACKCHANNEL)
@@ -731,16 +730,12 @@ rpcrdma_marshal_req(struct rpcrdma_xprt *r_xprt, struct rpc_rqst *rqst)
         */
        if (rpcrdma_args_inline(r_xprt, rqst)) {
                rtype = rpcrdma_noch;
-               rpclen = rqst->rq_snd_buf.len;
        } else if (ddp_allowed && rqst->rq_snd_buf.flags & XDRBUF_WRITE) {
                rtype = rpcrdma_readch;
-               rpclen = rqst->rq_snd_buf.head[0].iov_len +
-                        rqst->rq_snd_buf.tail[0].iov_len;
        } else {
                r_xprt->rx_stats.nomsg_call_count++;
                headerp->rm_type = htonl(RDMA_NOMSG);
                rtype = rpcrdma_areadch;
-               rpclen = 0;
        }
 
        req->rl_xid = rqst->rq_xid;
@@ -780,10 +775,10 @@ rpcrdma_marshal_req(struct rpcrdma_xprt *r_xprt, struct rpc_rqst *rqst)
                goto out_err;
        hdrlen = (unsigned char *)iptr - (unsigned char *)headerp;
 
-       dprintk("RPC: %5u %s: %s/%s: hdrlen %zd rpclen %zd\n",
+       dprintk("RPC: %5u %s: %s/%s: hdrlen %zd\n",
                rqst->rq_task->tk_pid, __func__,
                transfertypes[rtype], transfertypes[wtype],
-               hdrlen, rpclen);
+               hdrlen);
 
        if (!rpcrdma_prepare_send_sges(&r_xprt->rx_ia, req, hdrlen,
                                       &rqst->rq_snd_buf, rtype)) {