SUNRPC: Remove the redundant 'zerocopy' argument to xs_sendpages()
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
This commit is contained in:
parent
c87dc4c73b
commit
6f903b111e
|
@ -776,11 +776,10 @@ static int xs_send_pagedata(struct socket *sock, struct msghdr *msg, struct xdr_
|
|||
* @addrlen: UDP only -- length of destination address
|
||||
* @xdr: buffer containing this request
|
||||
* @base: starting position in the buffer
|
||||
* @zerocopy: true if it is safe to use sendpage()
|
||||
* @sent_p: return the total number of bytes successfully queued for sending
|
||||
*
|
||||
*/
|
||||
static int xs_sendpages(struct socket *sock, struct sockaddr *addr, int addrlen, struct xdr_buf *xdr, unsigned int base, bool zerocopy, int *sent_p)
|
||||
static int xs_sendpages(struct socket *sock, struct sockaddr *addr, int addrlen, struct xdr_buf *xdr, unsigned int base, int *sent_p)
|
||||
{
|
||||
struct msghdr msg = {
|
||||
.msg_name = addr,
|
||||
|
@ -935,7 +934,7 @@ static int xs_local_send_request(struct rpc_rqst *req)
|
|||
req->rq_xtime = ktime_get();
|
||||
status = xs_sendpages(transport->sock, NULL, 0, xdr,
|
||||
transport->xmit.offset,
|
||||
true, &sent);
|
||||
&sent);
|
||||
dprintk("RPC: %s(%u) = %d\n",
|
||||
__func__, xdr->len - transport->xmit.offset, status);
|
||||
|
||||
|
@ -1002,7 +1001,7 @@ static int xs_udp_send_request(struct rpc_rqst *req)
|
|||
|
||||
req->rq_xtime = ktime_get();
|
||||
status = xs_sendpages(transport->sock, xs_addr(xprt), xprt->addrlen,
|
||||
xdr, 0, true, &sent);
|
||||
xdr, 0, &sent);
|
||||
|
||||
dprintk("RPC: xs_udp_send_request(%u) = %d\n",
|
||||
xdr->len, status);
|
||||
|
@ -1066,7 +1065,6 @@ static int xs_tcp_send_request(struct rpc_rqst *req)
|
|||
struct rpc_xprt *xprt = req->rq_xprt;
|
||||
struct sock_xprt *transport = container_of(xprt, struct sock_xprt, xprt);
|
||||
struct xdr_buf *xdr = &req->rq_snd_buf;
|
||||
bool zerocopy = true;
|
||||
bool vm_wait = false;
|
||||
int status;
|
||||
int sent;
|
||||
|
@ -1083,12 +1081,6 @@ static int xs_tcp_send_request(struct rpc_rqst *req)
|
|||
xs_pktdump("packet data:",
|
||||
req->rq_svec->iov_base,
|
||||
req->rq_svec->iov_len);
|
||||
/* Don't use zero copy if this is a resend. If the RPC call
|
||||
* completes while the socket holds a reference to the pages,
|
||||
* then we may end up resending corrupted data.
|
||||
*/
|
||||
if (req->rq_task->tk_flags & RPC_TASK_SENT)
|
||||
zerocopy = false;
|
||||
|
||||
if (test_bit(XPRT_SOCK_UPD_TIMEOUT, &transport->sock_state))
|
||||
xs_tcp_set_socket_timeouts(xprt, transport->sock);
|
||||
|
@ -1101,7 +1093,7 @@ static int xs_tcp_send_request(struct rpc_rqst *req)
|
|||
sent = 0;
|
||||
status = xs_sendpages(transport->sock, NULL, 0, xdr,
|
||||
transport->xmit.offset,
|
||||
zerocopy, &sent);
|
||||
&sent);
|
||||
|
||||
dprintk("RPC: xs_tcp_send_request(%u) = %d\n",
|
||||
xdr->len - transport->xmit.offset, status);
|
||||
|
|
Loading…
Reference in New Issue