diff options
| author | Kirk McKusick <mckusick@FreeBSD.org> | 2018-12-15 19:18:58 +0000 |
|---|---|---|
| committer | Kirk McKusick <mckusick@FreeBSD.org> | 2018-12-15 19:18:58 +0000 |
| commit | 17ca94cfc0086257ae682031926ae5df27bcdcda (patch) | |
| tree | 72926735e06b848d7b203550383c543f60e4a057 /sys/kern/vfs_mountroot.c | |
| parent | e04d2a3c5a4d29f1b3239658b1e48a15d3fd5751 (diff) | |
Notes
Diffstat (limited to 'sys/kern/vfs_mountroot.c')
| -rw-r--r-- | sys/kern/vfs_mountroot.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/vfs_mountroot.c b/sys/kern/vfs_mountroot.c index babcf5a77732..20ddeb63db2b 100644 --- a/sys/kern/vfs_mountroot.c +++ b/sys/kern/vfs_mountroot.c @@ -211,7 +211,7 @@ set_rootvnode(void) struct proc *p; if (VFS_ROOT(TAILQ_FIRST(&mountlist), LK_EXCLUSIVE, &rootvnode)) - panic("Cannot find root vnode"); + panic("set_rootvnode: Cannot find root vnode"); VOP_UNLOCK(rootvnode, 0); @@ -309,7 +309,8 @@ vfs_mountroot_shuffle(struct thread *td, struct mount *mpdevfs) if (mporoot != mpdevfs) cache_purgevfs(mpdevfs, true); - VFS_ROOT(mporoot, LK_EXCLUSIVE, &vporoot); + if (VFS_ROOT(mporoot, LK_EXCLUSIVE, &vporoot)) + panic("vfs_mountroot_shuffle: Cannot find root vnode"); VI_LOCK(vporoot); vporoot->v_iflag &= ~VI_MOUNT; |
