diff options
Diffstat (limited to 'sys/fs/hpfs/hpfs_hash.c')
-rw-r--r-- | sys/fs/hpfs/hpfs_hash.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/sys/fs/hpfs/hpfs_hash.c b/sys/fs/hpfs/hpfs_hash.c index a948ade..450711c 100644 --- a/sys/fs/hpfs/hpfs_hash.c +++ b/sys/fs/hpfs/hpfs_hash.c @@ -43,6 +43,8 @@ #include <sys/malloc.h> #include <sys/proc.h> +#include <machine/mutex.h> + #include <fs/hpfs/hpfs.h> MALLOC_DEFINE(M_HPFSHASH, "HPFS hash", "HPFS node hash tables"); @@ -72,6 +74,16 @@ hpfs_hphashinit() } /* + * Destroy inode hash table. + */ +void +hpfs_hphashdestroy(void) +{ + + lockdestroy(&hpfs_hphash_lock); +} + +/* * Use the device/inum pair to find the incore inode, and return a pointer * to it. If it is in core, return it, even if it is locked. */ @@ -126,7 +138,7 @@ loop: for (hp = HPNOHASH(dev, ino)->lh_first; hp; hp = hp->h_hash.le_next) { if (ino == hp->h_no && dev == hp->h_dev) { vp = HPTOV(hp); - simple_lock (&vp->v_interlock); + mtx_enter(&vp->v_interlock, MTX_DEF); simple_unlock (&hpfs_hphash_slock); if (vget(vp, LK_EXCLUSIVE | LK_INTERLOCK, p)) goto loop; |