diff options
author | jasone <jasone@FreeBSD.org> | 2000-10-04 01:29:17 +0000 |
---|---|---|
committer | jasone <jasone@FreeBSD.org> | 2000-10-04 01:29:17 +0000 |
commit | 4e290e67b7310d906f113850fddfdf1017a9d15b (patch) | |
tree | bae3e99c848c6e38aee34a7cf61ffa9ca55b0095 /sys/isofs/cd9660/cd9660_node.c | |
parent | bea51a4aa1bf67a183bd1d4a6227fa891345af60 (diff) | |
download | FreeBSD-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/isofs/cd9660/cd9660_node.c')
-rw-r--r-- | sys/isofs/cd9660/cd9660_node.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/isofs/cd9660/cd9660_node.c b/sys/isofs/cd9660/cd9660_node.c index 54bace3..500a1a6 100644 --- a/sys/isofs/cd9660/cd9660_node.c +++ b/sys/isofs/cd9660/cd9660_node.c @@ -49,6 +49,8 @@ #include <sys/malloc.h> #include <sys/stat.h> +#include <machine/mutex.h> + #include <isofs/cd9660/iso.h> #include <isofs/cd9660/cd9660_node.h> #include <isofs/cd9660/cd9660_mount.h> @@ -108,7 +110,7 @@ loop: for (ip = isohashtbl[INOHASH(dev, inum)]; ip; ip = ip->i_next) { if (inum == ip->i_number && dev == ip->i_dev) { vp = ITOV(ip); - simple_lock(&vp->v_interlock); + mtx_enter(&vp->v_interlock, MTX_DEF); simple_unlock(&cd9660_ihash_slock); if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, p)) goto loop; @@ -138,7 +140,7 @@ cd9660_ihashins(ip) *ipp = ip; simple_unlock(&cd9660_ihash_slock); - lockmgr(&ip->i_vnode->v_lock, LK_EXCLUSIVE, (struct simplelock *)0, p); + lockmgr(&ip->i_vnode->v_lock, LK_EXCLUSIVE, (struct mtx *)0, p); } /* @@ -218,6 +220,7 @@ cd9660_reclaim(ap) vrele(ip->i_devvp); ip->i_devvp = 0; } + lockdestroy(&ip->i_vnode->v_lock); FREE(vp->v_data, M_ISOFSNODE); vp->v_data = NULL; return (0); |