예제 #1
0
/*
 * Tear down vnode cache
 */
void
pfs_vncache_unload(void)
{
	rm_at_exit(pfs_exit);
	if (pfs_vncache_entries != 0)
		printf("pfs_vncache_unload(): %d entries remaining\n",
		    pfs_vncache_entries);
	mtx_destroy(&pfs_vncache_mutex);
}
예제 #2
0
/*
 * unmount system call
 */
static int
linprocfs_unmount(struct mount *mp, int mntflags)
{
	int error;
	int flags = 0;

	if (mntflags & MNT_FORCE)
		flags |= FORCECLOSE;

	error = vflush(mp, 0, flags);
	if (error)
		return (error);

	if (mp->mnt_vfc->vfc_refcount == 1)
		rm_at_exit(linprocfs_exit);

	return (0);
}
예제 #3
0
void
ncp_done(void) {
	struct ncp_conn *ncp, *nncp;
	struct proc *p = curproc;
	
	untimeout(ncp_timer,NULL,ncp_timer_handle);
	rm_at_exit(ncp_at_exit);
	ncp_conn_locklist(LK_EXCLUSIVE, p);
	for (ncp = conn_list.slh_first; ncp; ncp = nncp) {
		nncp = ncp->nc_next.sle_next;
		ncp->ref_cnt = 0;
		if (ncp_conn_lock(ncp, p, p->p_ucred,NCPM_READ|NCPM_EXECUTE|NCPM_WRITE)) {
			NCPFATAL("Can't lock connection !\n");
			continue;
		}
		if (ncp_disconnect(ncp) != 0)
			ncp_conn_unlock(ncp,p);
	}
	ncp_conn_unlocklist(p);
}