Browse Source

nfsd4: use session limits to release send buffer reservation

Once we know the limits the session places on the size of the rpc, we
can also use that information to release any unnecessary reserved reply
buffer space.

Signed-off-by: J. Bruce Fields <bfields@redhat.com>
J. Bruce Fields 11 years ago
parent
commit
32aaa62ede
1 changed files with 1 additions and 0 deletions
  1. 1 0
      fs/nfsd/nfs4state.c

+ 1 - 0
fs/nfsd/nfs4state.c

@@ -2290,6 +2290,7 @@ nfsd4_sequence(struct svc_rqst *rqstp,
 				    nfserr_rep_too_big;
 				    nfserr_rep_too_big;
 	if (xdr_restrict_buflen(xdr, buflen - 2 * RPC_MAX_AUTH_SIZE))
 	if (xdr_restrict_buflen(xdr, buflen - 2 * RPC_MAX_AUTH_SIZE))
 		goto out_put_session;
 		goto out_put_session;
+	svc_reserve(rqstp, buflen);
 
 
 	status = nfs_ok;
 	status = nfs_ok;
 	/* Success! bump slot seqid */
 	/* Success! bump slot seqid */