The use of VOP_ISLOCKED() without a check for the return values can cause

false positives. Replace the #ifdef block with the proper
ASSERT_VOP_UNLOCKED() assert.

Tested by:	pho
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2011-10-24 13:56:31 +00:00
parent 234ab7412e
commit 17edcd764d

View File

@ -242,10 +242,7 @@ nullfs_root(mp, flags, vpp)
vp = MOUNTTONULLMOUNT(mp)->nullm_rootvp;
VREF(vp);
#ifdef NULLFS_DEBUG
if (VOP_ISLOCKED(vp))
panic("root vnode is locked.\n");
#endif
ASSERT_VOP_UNLOCKED(vp, "root vnode is locked");
vn_lock(vp, flags | LK_RETRY);
*vpp = vp;
return 0;