aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/sunrpc
diff options
context:
space:
mode:
authorJ. Bruce Fields <bfields@redhat.com>2014-05-12 18:10:58 -0400
committerJ. Bruce Fields <bfields@redhat.com>2014-05-30 17:32:17 -0400
commita5cddc885b99458df963a75abbe0b40cbef56c48 (patch)
treeb7f200949823f98207aa2d2fd72c112fa3e6ee8e /include/linux/sunrpc
parentd05d5744ef67879877dbe2e3d0fb9fcc27ee44e5 (diff)
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 'include/linux/sunrpc')
-rw-r--r--include/linux/sunrpc/svc.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/include/linux/sunrpc/svc.h b/include/linux/sunrpc/svc.h
index 85cb6472a423..1bc7cd05b22e 100644
--- a/include/linux/sunrpc/svc.h
+++ b/include/linux/sunrpc/svc.h
@@ -260,7 +260,10 @@ struct svc_rqst {
260 void * rq_argp; /* decoded arguments */ 260 void * rq_argp; /* decoded arguments */
261 void * rq_resp; /* xdr'd results */ 261 void * rq_resp; /* xdr'd results */
262 void * rq_auth_data; /* flavor-specific data */ 262 void * rq_auth_data; /* flavor-specific data */
263 263 int rq_auth_slack; /* extra space xdr code
264 * should leave in head
265 * for krb5i, krb5p.
266 */
264 int rq_reserved; /* space on socket outq 267 int rq_reserved; /* space on socket outq
265 * reserved for this request 268 * reserved for this request
266 */ 269 */
@@ -456,11 +459,7 @@ char * svc_print_addr(struct svc_rqst *, char *, size_t);
456 */ 459 */
457static inline void svc_reserve_auth(struct svc_rqst *rqstp, int space) 460static inline void svc_reserve_auth(struct svc_rqst *rqstp, int space)
458{ 461{
459 int added_space = 0; 462 svc_reserve(rqstp, space + rqstp->rq_auth_slack);
460
461 if (rqstp->rq_authop->flavour)
462 added_space = RPC_MAX_AUTH_SIZE;
463 svc_reserve(rqstp, space + added_space);
464} 463}
465 464
466#endif /* SUNRPC_SVC_H */ 465#endif /* SUNRPC_SVC_H */