summaryrefslogtreecommitdiffstats
path: root/sys/fs/devfs
diff options
context:
space:
mode:
authorkib <kib@FreeBSD.org>2008-06-05 09:15:47 +0000
committerkib <kib@FreeBSD.org>2008-06-05 09:15:47 +0000
commit99633165a5f86fa9bb63d51c824f99c1f7eb258b (patch)
tree94d1017a62657b6bb29511fe9683164833071c01 /sys/fs/devfs
parent570605957cddbe81ec5fa4432db2f18cc42f934a (diff)
downloadFreeBSD-src-99633165a5f86fa9bb63d51c824f99c1f7eb258b.zip
FreeBSD-src-99633165a5f86fa9bb63d51c824f99c1f7eb258b.tar.gz
When devfs_allocv() committed to create new vnode, since de_vnode is NULL,
the dm_lock is held while the newly allocated vnode is locked. Since no other threads may try to lock the new vnode yet, the LOR there cannot result in the deadlock. Shut down the witness warning to note this fact. Tested by: pho Prodded by: attilio
Diffstat (limited to 'sys/fs/devfs')
-rw-r--r--sys/fs/devfs/devfs_vnops.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/fs/devfs/devfs_vnops.c b/sys/fs/devfs/devfs_vnops.c
index 813f3a5..649f492d 100644
--- a/sys/fs/devfs/devfs_vnops.c
+++ b/sys/fs/devfs/devfs_vnops.c
@@ -340,7 +340,7 @@ devfs_allocv(struct devfs_dirent *de, struct mount *mp, struct vnode **vpp, stru
} else {
vp->v_type = VBAD;
}
- vn_lock(vp, LK_EXCLUSIVE | LK_RETRY);
+ vn_lock(vp, LK_EXCLUSIVE | LK_RETRY | LK_NOWITNESS);
mtx_lock(&devfs_de_interlock);
vp->v_data = de;
de->de_vnode = vp;
OpenPOWER on IntegriCloud