 flush_signals(current);  
lockd(struct svc_rqst *rqstp){	struct svc_serv	*serv = rqstp->rq_server;	int		err = 0;	unsigned long grace_period_expire;	/* Lock module and set up kernel thread */	/* lockd_up is waiting for us to startup, so will	 * be holding a reference to this module, so it	 * is safe to just claim another reference	 */	__module_get(THIS_MODULE);	lock_kernel();	/*	 * Let our maker know we're running.	 */	nlmsvc_pid = current->pid;	up(&lockd_start);	daemonize("lockd");	/* Process request with signals blocked, but allow SIGKILL.  */	allow_signal(SIGKILL);	/* kick rpciod */	rpciod_up();	dprintk("NFS locking service started (ver " LOCKD_VERSION ").\n");	if (!nlm_timeout)		nlm_timeout = LOCKD_DFLT_TIMEO;	nlmsvc_timeout = nlm_timeout * HZ;	grace_period_expire = set_grace_period();	/*	 * The main request loop. We don't terminate until the last	 * NFS mount or NFS daemon has gone away, and we've been sent a	 * signal, or else another process has taken over our job.	 */	while ((nlmsvc_users || !signalled()) && nlmsvc_pid == current->pid) {		long timeout = MAX_SCHEDULE_TIMEOUT;		if (signalled()) {			flush_signals(current);			if (nlmsvc_ops) {				nlmsvc_invalidate_all();				grace_period_expire = set_grace_period();			}		}		/*		 * Retry any blocked locks that have been notified by		 * the VFS. Don't do this during grace period.		 * (Theoretically, there shouldn't even be blocked locks		 * during grace period).		 */		if (!nlmsvc_grace_period) {			timeout = nlmsvc_retry_blocked();		} else if (time_before(grace_period_expire, jiffies))			clear_grace_period();		/*		 * Find a socket with data available and call its		 * recvfrom routine.		 */		err = svc_recv(serv, rqstp, timeout);		if (err == -EAGAIN || err == -EINTR)			continue;		if (err < 0) {			printk(KERN_WARNING			       "lockd: terminating on error %d\n",			       -err);			break;		}		dprintk("lockd: request from %08x\n",			(unsigned)ntohl(rqstp->rq_addr.sin_addr.s_addr));		svc_process(serv, rqstp);	}	/*	 * Check whether there's a new lockd process before	 * shutting down the hosts and clearing the slot.	 */	if (!nlmsvc_pid || current->pid == nlmsvc_pid) {		if (nlmsvc_ops)			nlmsvc_invalidate_all();		nlm_shutdown_hosts();		nlmsvc_pid = 0;	} else		printk(KERN_DEBUG			"lockd: new process, skipping host shutdown\n");	wake_up(&lockd_exit);			/* Exit the RPC thread */	svc_exit_thread(rqstp);	/* release rpciod */	rpciod_down();	/* Release module */	unlock_kernel();	module_put_and_exit(0);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/46be925fa6f4796e732e16a020fa0ef9d48ea7c8/svc.c/clean/fs/lockd/svc.c