/* External function to wake up a server waiting for data This really only makes sense for services like lockd which have exactly one thread anyway.  */
void svc_wake_up(struct svc_serv *serv)
/* External function to wake up a server waiting for data This really only makes sense for services like lockd which have exactly one thread anyway.  */
void svc_wake_up(struct svc_serv *serv)
{
	struct svc_rqst	*rqstp;
	unsigned int i;
	struct svc_pool *pool;
	for (i = 0; i < serv->sv_nrpools; i++) {
		pool = &serv->sv_pools[i];
		spin_lock_bh(&pool->sp_lock);
		if (!list_empty(&pool->sp_threads)) {
			rqstp = list_entry(pool->sp_threads.next,
					   struct svc_rqst,
					   rq_list);
			dprintk("svc: daemon %p woken up.\n", rqstp);
			wake_up(&rqstp->rq_wait);
		}
		spin_unlock_bh(&pool->sp_lock);
	}
}