diff options
author | kib <kib@FreeBSD.org> | 2011-10-24 13:56:31 +0000 |
---|---|---|
committer | kib <kib@FreeBSD.org> | 2011-10-24 13:56:31 +0000 |
commit | c8591306ab99d1b74f3453de34382e90888e9a14 (patch) | |
tree | 7eff2c5e0ada69798f376d685e4b49d0991a1232 /sys/fs | |
parent | 177754802c82adf2c6928cda80086b32ccd1e8eb (diff) | |
download | FreeBSD-src-c8591306ab99d1b74f3453de34382e90888e9a14.zip FreeBSD-src-c8591306ab99d1b74f3453de34382e90888e9a14.tar.gz |
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
Diffstat (limited to 'sys/fs')
-rw-r--r-- | sys/fs/nullfs/null_vfsops.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/sys/fs/nullfs/null_vfsops.c b/sys/fs/nullfs/null_vfsops.c index fd20151..8c00f87 100644 --- a/sys/fs/nullfs/null_vfsops.c +++ b/sys/fs/nullfs/null_vfsops.c @@ -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; |