diff options
author | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-02-19 13:13:40 -0500 |
---|---|---|
committer | Trond Myklebust <trond.myklebust@hammerspace.com> | 2019-02-20 17:35:58 -0500 |
commit | c87dc4c73bb04cb3f86c7d60f9f576eb08514ad8 (patch) | |
tree | 896eab2c3dccc98b86417621a976745c2270e474 /net/sunrpc | |
parent | 0472e476604998c127f3c80d291113e77c5676ac (diff) | |
download | linux-c87dc4c73bb04cb3f86c7d60f9f576eb08514ad8.tar.bz2 |
SUNRPC: Further cleanups of xs_sendpages()
Now that we send the pages using a struct msghdr, instead of
using sendpage(), we no longer need to 'prime the socket' with
an address for unconnected UDP messages.
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'net/sunrpc')
-rw-r--r-- | net/sunrpc/xprtsock.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/net/sunrpc/xprtsock.c b/net/sunrpc/xprtsock.c index 35d1e81b6e5e..9c6eb76b3f46 100644 --- a/net/sunrpc/xprtsock.c +++ b/net/sunrpc/xprtsock.c @@ -751,10 +751,6 @@ static int xs_sendmsg(struct socket *sock, struct msghdr *msg, size_t seek) static int xs_send_kvec(struct socket *sock, struct msghdr *msg, struct kvec *vec, size_t seek) { - if (!vec) { - iov_iter_kvec(&msg->msg_iter, WRITE, NULL, 0, 0); - return sock_sendmsg(sock, msg); - } iov_iter_kvec(&msg->msg_iter, WRITE, vec, 1, vec->iov_len); return xs_sendmsg(sock, msg, seek); } @@ -797,12 +793,7 @@ static int xs_sendpages(struct socket *sock, struct sockaddr *addr, int addrlen, if (unlikely(!sock)) return -ENOTSOCK; - if (base != 0) { - addr = NULL; - addrlen = 0; - } - - if (base < xdr->head[0].iov_len || addr != NULL) { + if (base < xdr->head[0].iov_len) { unsigned int len = xdr->head[0].iov_len - base; remainder -= len; if (remainder == 0) |