umapm_hashlock is a mutex.
This commit is contained in:
parent
53b26d467e
commit
3fa279a5ee
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: umap_vfsops.c,v 1.70 2007/10/10 20:42:31 ad Exp $ */
|
||||
/* $NetBSD: umap_vfsops.c,v 1.71 2007/10/10 22:07:48 ad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -41,7 +41,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: umap_vfsops.c,v 1.70 2007/10/10 20:42:31 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: umap_vfsops.c,v 1.71 2007/10/10 22:07:48 ad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -191,7 +191,7 @@ umapfs_mount(mp, path, data, data_len, l)
|
|||
amp->umapm_bypass = umap_bypass;
|
||||
amp->umapm_alloc = layer_node_alloc; /* the default alloc is fine */
|
||||
amp->umapm_vnodeop_p = umap_vnodeop_p;
|
||||
simple_lock_init(&->umapm_hashlock);
|
||||
mutex_init(&->umapm_hashlock, MUTEX_DEFAULT, IPL_NONE);
|
||||
amp->umapm_node_hashtbl = hashinit(NUMAPNODECACHE, HASH_LIST, M_CACHE,
|
||||
M_WAITOK, &->umapm_node_hash);
|
||||
|
||||
|
@ -235,7 +235,8 @@ umapfs_mount(mp, path, data, data_len, l)
|
|||
int
|
||||
umapfs_unmount(struct mount *mp, int mntflags, struct lwp *l)
|
||||
{
|
||||
struct vnode *rtvp = MOUNTTOUMAPMOUNT(mp)->umapm_rootvp;
|
||||
struct umap_mount *amp = MOUNTTOUMAPMOUNT(mp);
|
||||
struct vnode *rtvp = amp->umapm_rootvp;
|
||||
int error;
|
||||
int flags = 0;
|
||||
|
||||
|
@ -265,6 +266,7 @@ umapfs_unmount(struct mount *mp, int mntflags, struct lwp *l)
|
|||
/*
|
||||
* Finally, throw away the umap_mount structure
|
||||
*/
|
||||
mutex_destroy(&->umapm_hashlock);
|
||||
free(mp->mnt_data, M_UFSMNT); /* XXX */
|
||||
mp->mnt_data = 0;
|
||||
return (0);
|
||||
|
|
Loading…
Reference in New Issue