diff options
author | J. Bruce Fields <bfields@redhat.com> | 2014-05-13 00:10:58 +0200 |
---|---|---|
committer | J. Bruce Fields <bfields@redhat.com> | 2014-05-30 23:32:17 +0200 |
commit | a5cddc885b99458df963a75abbe0b40cbef56c48 (patch) | |
tree | b7f200949823f98207aa2d2fd72c112fa3e6ee8e /fs/nfsd/nfs4proc.c | |
parent | nfsd4: kill write32, write64 (diff) | |
download | linux-a5cddc885b99458df963a75abbe0b40cbef56c48.tar.xz linux-a5cddc885b99458df963a75abbe0b40cbef56c48.zip |
nfsd4: better reservation of head space for krb5
RPC_MAX_AUTH_SIZE is scattered around several places. Better to set it
once in the auth code, where this kind of estimate should be made. And
while we're at it we can leave it zero when we're not using krb5i or
krb5p.
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
Diffstat (limited to 'fs/nfsd/nfs4proc.c')
-rw-r--r-- | fs/nfsd/nfs4proc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/nfsd/nfs4proc.c b/fs/nfsd/nfs4proc.c index 2d786b813c7e..16e71d033ea5 100644 --- a/fs/nfsd/nfs4proc.c +++ b/fs/nfsd/nfs4proc.c @@ -1261,13 +1261,13 @@ static void svcxdr_init_encode(struct svc_rqst *rqstp, xdr->buf = buf; xdr->iov = head; xdr->p = head->iov_base + head->iov_len; - xdr->end = head->iov_base + PAGE_SIZE - 2 * RPC_MAX_AUTH_SIZE; + xdr->end = head->iov_base + PAGE_SIZE - rqstp->rq_auth_slack; /* Tail and page_len should be zero at this point: */ buf->len = buf->head[0].iov_len; xdr->scratch.iov_len = 0; xdr->page_ptr = buf->pages; buf->buflen = PAGE_SIZE * (1 + rqstp->rq_page_end - buf->pages) - - 2 * RPC_MAX_AUTH_SIZE; + - rqstp->rq_auth_slack; } /* |