summaryrefslogtreecommitdiffstats
path: root/net/sunrpc/socklib.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2022-04-06 22:51:58 -0400
committerTrond Myklebust <trond.myklebust@hammerspace.com>2022-04-07 16:20:01 -0400
commitff053dbbaffec45c85e5bfe43306d26694a6433f (patch)
tree31ed2d2f469d5aa1f58739d85d27cbc69a0818e9 /net/sunrpc/socklib.c
parentb056fa070814897be32d83b079dbc311375588e7 (diff)
downloadlinux-ff053dbbaffec45c85e5bfe43306d26694a6433f.tar.bz2
SUNRPC: Move the call to xprt_send_pagedata() out of xprt_sock_sendmsg()
The client and server have different requirements for their memory allocation, so move the allocation of the send buffer out of the socket send code that is common to both. Reported-by: NeilBrown <neilb@suse.de> Fixes: b2648015d452 ("SUNRPC: Make the rpciod and xprtiod slab allocation modes consistent") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'net/sunrpc/socklib.c')
-rw-r--r--net/sunrpc/socklib.c6
1 files changed, 0 insertions, 6 deletions
diff --git a/net/sunrpc/socklib.c b/net/sunrpc/socklib.c
index 05b38bf68316..71ba4cf513bc 100644
--- a/net/sunrpc/socklib.c
+++ b/net/sunrpc/socklib.c
@@ -221,12 +221,6 @@ static int xprt_send_kvec(struct socket *sock, struct msghdr *msg,
static int xprt_send_pagedata(struct socket *sock, struct msghdr *msg,
struct xdr_buf *xdr, size_t base)
{
- int err;
-
- err = xdr_alloc_bvec(xdr, rpc_task_gfp_mask());
- if (err < 0)
- return err;
-
iov_iter_bvec(&msg->msg_iter, WRITE, xdr->bvec, xdr_buf_pagecount(xdr),
xdr->page_len + xdr->page_base);
return xprt_sendmsg(sock, msg, base + xdr->page_base);