sys/kern/vfs_subr.c
/*
 * Unmount all filesystems. The list is traversed in reverse order
 * of mounting to avoid dependencies.
 */
Unmount all filesystems. The list is traversed in reverse order
of mounting to avoid dependencies.
Unmount all filesystems . The list is traversed in reverse order of mounting to avoid dependencies .
void
vfs_unmountall()
{
	struct mount *mp, *nmp;
	struct proc *p = curproc;	
	for (mp = mountlist.cqh_last; mp != (void *)&mountlist; mp = nmp) {
		nmp = mp->mnt_list.cqe_prev;
		(void) dounmount(mp, MNT_FORCE, p);
	}
}
void vfs_unmountall ( ) { struct mount * mp , * nmp ; struct proc * p = curproc ; for ( mp = mountlist . cqh_last ; mp != ( void * ) & mountlist ; mp = nmp ) { nmp = mp -> mnt_list . cqe_prev ; ( void ) dounmount ( mp , MNT_FORCE , p ) ; } }
Unmount all filesystems.
Unmount all filesystems .
/* XXX */ /*
	 * Since this only runs when rebooting, it is not interlocked.
	 */