/* Called from a server thread as it's exiting. Caller must hold the BKL or the "service mutex", whichever is appropriate for the service.  */
void svc_exit_thread(struct svc_rqst *rqstp)
/* Called from a server thread as it's exiting. Caller must hold the BKL or the "service mutex", whichever is appropriate for the service.  */
void svc_exit_thread(struct svc_rqst *rqstp)
{
	struct svc_serv	*serv = rqstp->rq_server;
	struct svc_pool	*pool = rqstp->rq_pool;
	svc_release_buffer(rqstp);
	kfree(rqstp->rq_resp);
	kfree(rqstp->rq_argp);
	kfree(rqstp->rq_auth_data);
	spin_lock_bh(&pool->sp_lock);
	pool->sp_nrthreads--;
	list_del(&rqstp->rq_all);
	spin_unlock_bh(&pool->sp_lock);
	kfree(rqstp);
	if (serv)
		svc_destroy(serv);
}