summaryrefslogtreecommitdiffstats
path: root/sys/tmpfs/tmpfs_subr.c
diff options
context:
space:
mode:
authorvisa <visa@openbsd.org>2018-03-28 16:34:28 +0000
committervisa <visa@openbsd.org>2018-03-28 16:34:28 +0000
commitd78cb2ffdac0b6a8690a0d0268283287e63c9871 (patch)
tree58527bf5c044249fe3d7553d1c7021f1e69062f3 /sys/tmpfs/tmpfs_subr.c
parent- memory leak occurs when adding same table twice. (diff)
downloadwireguard-openbsd-d78cb2ffdac0b6a8690a0d0268283287e63c9871.tar.xz
wireguard-openbsd-d78cb2ffdac0b6a8690a0d0268283287e63c9871.zip
Use RWL_IS_VNODE with locks that are acquired through VOP_LOCK(),
to appease WITNESS. ext2fs and ffs already use the flag. The same locking pattern appears with other file systems too, so this patch addresses the remaining cases. OK mpi@
Diffstat (limited to 'sys/tmpfs/tmpfs_subr.c')
-rw-r--r--sys/tmpfs/tmpfs_subr.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/tmpfs/tmpfs_subr.c b/sys/tmpfs/tmpfs_subr.c
index adc982184e9..037de2f4bb9 100644
--- a/sys/tmpfs/tmpfs_subr.c
+++ b/sys/tmpfs/tmpfs_subr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tmpfs_subr.c,v 1.18 2017/04/20 14:13:00 visa Exp $ */
+/* $OpenBSD: tmpfs_subr.c,v 1.19 2018/03/28 16:34:28 visa Exp $ */
/* $NetBSD: tmpfs_subr.c,v 1.79 2012/03/13 18:40:50 elad Exp $ */
/*
@@ -314,7 +314,7 @@ again:
return error;
}
- rrw_init_flags(&node->tn_vlock, "tnode", RWL_DUPOK);
+ rrw_init_flags(&node->tn_vlock, "tnode", RWL_DUPOK | RWL_IS_VNODE);
vp->v_type = node->tn_type;
/* Type-specific initialization. */