summaryrefslogtreecommitdiff
path: root/net/sunrpc/auth_gss/gss_rpc_xdr.c
diff options
context:
space:
mode:
authorTrond Myklebust <trond.myklebust@hammerspace.com>2018-09-16 07:08:20 +0300
committerTrond Myklebust <trond.myklebust@hammerspace.com>2018-09-30 22:35:16 +0300
commit431f6eb3570f286036bc8718a908a283f5d99473 (patch)
tree81117e3e64d4e6e3b847539cde5338a1e95eccca /net/sunrpc/auth_gss/gss_rpc_xdr.c
parent79c99152a374c72c8b90c27b3d46d990641951bb (diff)
downloadlinux-431f6eb3570f286036bc8718a908a283f5d99473.tar.xz
SUNRPC: Add a label for RPC calls that require allocation on receive
If the RPC call relies on the receive call allocating pages as buffers, then let's label it so that we a) Don't leak memory by allocating pages for requests that do not expect this behaviour b) Can optimise for the common case where calls do not require allocation. Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
Diffstat (limited to 'net/sunrpc/auth_gss/gss_rpc_xdr.c')
-rw-r--r--net/sunrpc/auth_gss/gss_rpc_xdr.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/net/sunrpc/auth_gss/gss_rpc_xdr.c b/net/sunrpc/auth_gss/gss_rpc_xdr.c
index 444380f968f1..006062ad5f58 100644
--- a/net/sunrpc/auth_gss/gss_rpc_xdr.c
+++ b/net/sunrpc/auth_gss/gss_rpc_xdr.c
@@ -784,6 +784,7 @@ void gssx_enc_accept_sec_context(struct rpc_rqst *req,
xdr_inline_pages(&req->rq_rcv_buf,
PAGE_SIZE/2 /* pretty arbitrary */,
arg->pages, 0 /* page base */, arg->npages * PAGE_SIZE);
+ req->rq_rcv_buf.flags |= XDRBUF_SPARSE_PAGES;
done:
if (err)
dprintk("RPC: gssx_enc_accept_sec_context: %d\n", err);