summaryrefslogtreecommitdiffstats
path: root/sys/kern/vfs_subr.c
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2012-11-19 11:35:56 +0000
committeravg <avg@FreeBSD.org>2012-11-19 11:35:56 +0000
commit4726ba44fc9798f831806588e9c7a021fcd00bfc (patch)
treeb75f49b7e700e4b5d422c3b83df75734192ee597 /sys/kern/vfs_subr.c
parent4d2c561ebf8be7ac1fcb05244c285a9eb14363d7 (diff)
downloadFreeBSD-src-4726ba44fc9798f831806588e9c7a021fcd00bfc.zip
FreeBSD-src-4726ba44fc9798f831806588e9c7a021fcd00bfc.tar.gz
assert_vop_locked should treat LK_EXCLOTHER as the not locked case
... from a perspective of the current thread. Spotted by: mjg Discussed with: kib MFC after: 18 days
Diffstat (limited to 'sys/kern/vfs_subr.c')
-rw-r--r--sys/kern/vfs_subr.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/kern/vfs_subr.c b/sys/kern/vfs_subr.c
index 85e1fa1..179b7f4 100644
--- a/sys/kern/vfs_subr.c
+++ b/sys/kern/vfs_subr.c
@@ -3988,7 +3988,8 @@ void
assert_vop_locked(struct vnode *vp, const char *str)
{
- if (!IGNORE_LOCK(vp) && VOP_ISLOCKED(vp) == 0)
+ if (!IGNORE_LOCK(vp) &&
+ (VOP_ISLOCKED(vp) == 0 || VOP_ISLOCKED(vp) == LK_EXCLOTHER))
vfs_badlock("is not locked but should be", str, vp);
}
OpenPOWER on IntegriCloud