Clarify panic in set_rootvnode().

Check for panic in vfs_mountroot_shuffle().

Sponsored by: Netflix
This commit is contained in:
Kirk McKusick 2018-12-15 19:18:58 +00:00
parent e04d2a3c5a
commit 17ca94cfc0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=342136

View file

@ -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;