FreeBSD/sys/fs/pseudofs/pseudofs_vncache.c
/*
 * Free all vnodes associated with a defunct process
 */
Free all vnodes associated with a defunct process
Free all vnodes associated with a defunct process
static void
pfs_exit(void *arg, struct proc *p)
{
	struct pfs_vdata *pvd;
	int dead;
	if (pfs_vncache == NULL)
		return;
	mtx_lock(&pfs_vncache_mutex);
	for (pvd = pfs_vncache, dead = 0; pvd != NULL; pvd = pvd->pvd_next)
		if (pvd->pvd_pid == p->p_pid)
			dead = pvd->pvd_dead = 1;
	if (dead)
		pfs_purge_locked(NULL);
	mtx_unlock(&pfs_vncache_mutex);
}
static void pfs_exit ( void * arg , struct proc * p ) { struct pfs_vdata * pvd ; int dead ; if ( pfs_vncache == NULL ) return ; mtx_lock ( & pfs_vncache_mutex ) ; for ( pvd = pfs_vncache , dead = 0 ; pvd != NULL ; pvd = pvd -> pvd_next ) if ( pvd -> pvd_pid == p -> p_pid ) dead = pvd -> pvd_dead = 1 ; if ( dead ) pfs_purge_locked ( NULL ) ; mtx_unlock ( & pfs_vncache_mutex ) ; }
Free all vnodes associated with a defunct process
Free all vnodes associated with a defunct process