diff options
author | trasz <trasz@FreeBSD.org> | 2016-01-12 10:09:03 +0000 |
---|---|---|
committer | trasz <trasz@FreeBSD.org> | 2016-01-12 10:09:03 +0000 |
commit | a35cfac66cd13b8a8193084a71a760710f87703e (patch) | |
tree | 9323e17144f0c21cec420ec7a5815cc2ff607ff9 /sys/kern/vfs_mountroot.c | |
parent | 51adb09baa42149bdf1b01ca23587b8743c2292e (diff) | |
download | FreeBSD-src-a35cfac66cd13b8a8193084a71a760710f87703e.zip FreeBSD-src-a35cfac66cd13b8a8193084a71a760710f87703e.tar.gz |
MFC r287107:
Make vfs_unmountall() unmount /dev after /, not before. The only
reason this didn't result in an unclean shutdown is that devfs ignores
MNT_FORCE flag.
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3467
Diffstat (limited to 'sys/kern/vfs_mountroot.c')
-rw-r--r-- | sys/kern/vfs_mountroot.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/kern/vfs_mountroot.c b/sys/kern/vfs_mountroot.c index 473cd79..5c49ff7 100644 --- a/sys/kern/vfs_mountroot.c +++ b/sys/kern/vfs_mountroot.c @@ -95,6 +95,11 @@ static struct mntarg *parse_mountroot_options(struct mntarg *, const char *); */ struct vnode *rootvnode; +/* + * Mount of the system's /dev. + */ +struct mount *rootdevmp; + char *rootdevnames[2] = {NULL, NULL}; struct mtx root_holds_mtx; @@ -236,6 +241,7 @@ vfs_mountroot_devfs(struct thread *td, struct mount **mpp) mtx_unlock(&mountlist_mtx); *mpp = mp; + rootdevmp = mp; set_rootvnode(); error = kern_symlink(td, "/", "dev", UIO_SYSSPACE); |