summaryrefslogtreecommitdiffstats
path: root/sys/miscfs
diff options
context:
space:
mode:
authorjasone <jasone@FreeBSD.org>2000-10-04 01:29:17 +0000
committerjasone <jasone@FreeBSD.org>2000-10-04 01:29:17 +0000
commit4e290e67b7310d906f113850fddfdf1017a9d15b (patch)
treebae3e99c848c6e38aee34a7cf61ffa9ca55b0095 /sys/miscfs
parentbea51a4aa1bf67a183bd1d4a6227fa891345af60 (diff)
downloadFreeBSD-src-4e290e67b7310d906f113850fddfdf1017a9d15b.zip
FreeBSD-src-4e290e67b7310d906f113850fddfdf1017a9d15b.tar.gz
Convert lockmgr locks from using simple locks to using mutexes.
Add lockdestroy() and appropriate invocations, which corresponds to lockinit() and must be called to clean up after a lockmgr lock is no longer needed.
Diffstat (limited to 'sys/miscfs')
-rw-r--r--sys/miscfs/deadfs/dead_vnops.c4
-rw-r--r--sys/miscfs/nullfs/null_subr.c4
-rw-r--r--sys/miscfs/union/union_subr.c1
3 files changed, 7 insertions, 2 deletions
diff --git a/sys/miscfs/deadfs/dead_vnops.c b/sys/miscfs/deadfs/dead_vnops.c
index f990733..ab6678f 100644
--- a/sys/miscfs/deadfs/dead_vnops.c
+++ b/sys/miscfs/deadfs/dead_vnops.c
@@ -41,6 +41,8 @@
#include <sys/vnode.h>
#include <sys/poll.h>
+#include <machine/mutex.h>
+
static int chkvnlock __P((struct vnode *));
/*
* Prototypes for dead operations on vnodes.
@@ -210,7 +212,7 @@ dead_lock(ap)
* the interlock here.
*/
if (ap->a_flags & LK_INTERLOCK) {
- simple_unlock(&vp->v_interlock);
+ mtx_exit(&vp->v_interlock, MTX_DEF);
ap->a_flags &= ~LK_INTERLOCK;
}
if (!chkvnlock(vp))
diff --git a/sys/miscfs/nullfs/null_subr.c b/sys/miscfs/nullfs/null_subr.c
index efb1357..b5df78c 100644
--- a/sys/miscfs/nullfs/null_subr.c
+++ b/sys/miscfs/nullfs/null_subr.c
@@ -92,8 +92,10 @@ nullfs_uninit(vfsp)
struct vfsconf *vfsp;
{
- if (null_node_hashtbl)
+ if (null_node_hashtbl) {
+ lockdestroy(&null_hashlock);
free(null_node_hashtbl, M_NULLFSHASH);
+ }
return (0);
}
diff --git a/sys/miscfs/union/union_subr.c b/sys/miscfs/union/union_subr.c
index d1d6e31..9d34281 100644
--- a/sys/miscfs/union/union_subr.c
+++ b/sys/miscfs/union/union_subr.c
@@ -637,6 +637,7 @@ union_freevp(vp)
free(un->un_path, M_TEMP);
un->un_path = NULL;
}
+ lockdestroy(&un->un_lock);
FREE(vp->v_data, M_TEMP);
vp->v_data = 0;
OpenPOWER on IntegriCloud