diff options
author | eivind <eivind@FreeBSD.org> | 1999-12-11 16:13:02 +0000 |
---|---|---|
committer | eivind <eivind@FreeBSD.org> | 1999-12-11 16:13:02 +0000 |
commit | 287836faea1ff2f002f4c9ea357e87cb7f2b4cd6 (patch) | |
tree | 9524fb381c1cbe8aed4ee0af7b1a693057985617 /sys/miscfs/nullfs | |
parent | ff090abf5121f6bf2199248b70a4896d25f49550 (diff) | |
download | FreeBSD-src-287836faea1ff2f002f4c9ea357e87cb7f2b4cd6.zip FreeBSD-src-287836faea1ff2f002f4c9ea357e87cb7f2b4cd6.tar.gz |
Lock reporting and assertion changes.
* lockstatus() and VOP_ISLOCKED() gets a new process argument and a new
return value: LK_EXCLOTHER, when the lock is held exclusively by another
process.
* The ASSERT_VOP_(UN)LOCKED family is extended to use what this gives them
* Extend the vnode_if.src format to allow more exact specification than
locked/unlocked.
This commit should not do any semantic changes unless you are using
DEBUG_VFS_LOCKS.
Discussed with: grog, mch, peter, phk
Reviewed by: peter
Diffstat (limited to 'sys/miscfs/nullfs')
-rw-r--r-- | sys/miscfs/nullfs/null_vfsops.c | 6 | ||||
-rw-r--r-- | sys/miscfs/nullfs/null_vnops.c | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/sys/miscfs/nullfs/null_vfsops.c b/sys/miscfs/nullfs/null_vfsops.c index 06e1be0..e48a516 100644 --- a/sys/miscfs/nullfs/null_vfsops.c +++ b/sys/miscfs/nullfs/null_vfsops.c @@ -119,7 +119,7 @@ nullfs_mount(mp, path, data, ndp, p) * (XXX) VOP_ISLOCKED is needed? */ if ((mp->mnt_vnodecovered->v_op == null_vnodeop_p) && - VOP_ISLOCKED(mp->mnt_vnodecovered)) { + VOP_ISLOCKED(mp->mnt_vnodecovered, NULL)) { VOP_UNLOCK(mp->mnt_vnodecovered, 0, p); isvnunlocked = 1; } @@ -132,7 +132,7 @@ nullfs_mount(mp, path, data, ndp, p) /* * Re-lock vnode. */ - if (isvnunlocked && !VOP_ISLOCKED(mp->mnt_vnodecovered)) + if (isvnunlocked && !VOP_ISLOCKED(mp->mnt_vnodecovered, NULL)) vn_lock(mp->mnt_vnodecovered, LK_EXCLUSIVE | LK_RETRY, p); if (error) @@ -296,7 +296,7 @@ nullfs_root(mp, vpp) */ vp = MOUNTTONULLMOUNT(mp)->nullm_rootvp; VREF(vp); - if (VOP_ISLOCKED(vp)) { + if (VOP_ISLOCKED(vp, NULL)) { /* * XXX * Should we check type of node? diff --git a/sys/miscfs/nullfs/null_vnops.c b/sys/miscfs/nullfs/null_vnops.c index 225ac09..9600f3c 100644 --- a/sys/miscfs/nullfs/null_vnops.c +++ b/sys/miscfs/nullfs/null_vnops.c @@ -372,13 +372,13 @@ null_lookup(ap) vp = *ap->a_vpp; if (dvp == vp) return (error); - if (!VOP_ISLOCKED(dvp)) { + if (!VOP_ISLOCKED(dvp, NULL)) { unlockargs.a_vp = dvp; unlockargs.a_flags = 0; unlockargs.a_p = p; vop_nounlock(&unlockargs); } - if (vp != NULLVP && VOP_ISLOCKED(vp)) { + if (vp != NULLVP && VOP_ISLOCKED(vp, NULL)) { lockargs.a_vp = vp; lockargs.a_flags = LK_SHARED; lockargs.a_p = p; |