summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_export.c
diff options
context:
space:
mode:
authoreivind <eivind@FreeBSD.org>1999-12-11 16:13:02 +0000
committereivind <eivind@FreeBSD.org>1999-12-11 16:13:02 +0000
commit287836faea1ff2f002f4c9ea357e87cb7f2b4cd6 (patch)
tree9524fb381c1cbe8aed4ee0af7b1a693057985617 /sys/kern/vfs_export.c
parentff090abf5121f6bf2199248b70a4896d25f49550 (diff)
downloadFreeBSD-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/kern/vfs_export.c')
-rw-r--r--sys/kern/vfs_export.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/kern/vfs_export.c b/sys/kern/vfs_export.c
index a19c3d2..1f6b7a4 100644
--- a/sys/kern/vfs_export.c
+++ b/sys/kern/vfs_export.c
@@ -990,7 +990,7 @@ sched_sync(void)
splx(s);
while ((vp = LIST_FIRST(slp)) != NULL) {
- if (VOP_ISLOCKED(vp) == 0) {
+ if (VOP_ISLOCKED(vp, NULL) == 0) {
vn_lock(vp, LK_EXCLUSIVE | LK_RETRY, p);
(void) VOP_FSYNC(vp, p->p_ucred, MNT_LAZY, p);
VOP_UNLOCK(vp, 0, p);
@@ -1962,7 +1962,7 @@ DB_SHOW_COMMAND(lockedvnodes, lockedvnodes)
continue;
}
LIST_FOREACH(vp, &mp->mnt_vnodelist, v_mntvnodes) {
- if (VOP_ISLOCKED(vp))
+ if (VOP_ISLOCKED(vp, NULL))
vprint((char *)0, vp);
}
simple_lock(&mountlist_slock);
@@ -2450,7 +2450,7 @@ loop:
obj = vp->v_object;
if (obj == NULL || (obj->flags & OBJ_MIGHTBEDIRTY) == 0)
continue;
- if (VOP_ISLOCKED(vp))
+ if (VOP_ISLOCKED(vp, NULL))
continue;
}
OpenPOWER on IntegriCloud