MCPcopy Create free account
hub / github.com/F-Stack/f-stack / vfs_unmountall

Function vfs_unmountall

freebsd/kern/vfs_subr.c:4710–4735  ·  view source on GitHub ↗

* Unmount all filesystems. The list is traversed in reverse order * of mounting to avoid dependencies. */

Source from the content-addressed store, hash-verified

4708 * of mounting to avoid dependencies.
4709 */
4710void
4711vfs_unmountall(void)
4712{
4713 struct mount *mp, *tmp;
4714
4715 CTR1(KTR_VFS, "%s: unmounting all filesystems", __func__);
4716
4717 /*
4718 * Since this only runs when rebooting, it is not interlocked.
4719 */
4720 TAILQ_FOREACH_REVERSE_SAFE(mp, &mountlist, mntlist, mnt_list, tmp) {
4721 vfs_ref(mp);
4722
4723 /*
4724 * Forcibly unmounting "/dev" before "/" would prevent clean
4725 * unmount of the latter.
4726 */
4727 if (mp == rootdevmp)
4728 continue;
4729
4730 unmount_or_warn(mp);
4731 }
4732
4733 if (rootdevmp != NULL)
4734 unmount_or_warn(rootdevmp);
4735}
4736
4737static void
4738vfs_deferred_inactive(struct vnode *vp, int lkflags)

Callers 2

bufshutdownFunction · 0.85
kern_rerootFunction · 0.85

Calls 2

vfs_refFunction · 0.85
unmount_or_warnFunction · 0.85

Tested by

no test coverage detected