Add genfs_node_destroy(). Fixes a lock "leak" seen when running LOCKDEBUG
kernels.
This commit is contained in:
parent
0bd63d4831
commit
4abc9f506a
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: genfs_node.h,v 1.15 2007/02/15 15:40:53 ad Exp $ */
|
||||
/* $NetBSD: genfs_node.h,v 1.16 2007/02/20 16:19:42 ad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2001 Chuck Silvers.
|
||||
|
@ -83,6 +83,7 @@ struct genfs_node {
|
|||
|
||||
void genfs_size(struct vnode *, off_t, off_t *, int);
|
||||
void genfs_node_init(struct vnode *, const struct genfs_ops *);
|
||||
void genfs_node_destroy(struct vnode *);
|
||||
int genfs_gop_write(struct vnode *, struct vm_page **, int, int);
|
||||
int genfs_compat_gop_write(struct vnode *, struct vm_page **, int, int);
|
||||
void genfs_directio(struct vnode *, struct uio *, int);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: genfs_vnops.c,v 1.146 2007/02/15 15:40:53 ad Exp $ */
|
||||
/* $NetBSD: genfs_vnops.c,v 1.147 2007/02/20 16:19:42 ad Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1993
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.146 2007/02/15 15:40:53 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: genfs_vnops.c,v 1.147 2007/02/20 16:19:42 ad Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -1635,6 +1635,14 @@ genfs_node_init(struct vnode *vp, const struct genfs_ops *ops)
|
|||
gp->g_op = ops;
|
||||
}
|
||||
|
||||
void
|
||||
genfs_node_destroy(struct vnode *vp)
|
||||
{
|
||||
struct genfs_node *gp = VTOG(vp);
|
||||
|
||||
rw_destroy(&gp->g_glock);
|
||||
}
|
||||
|
||||
void
|
||||
genfs_size(struct vnode *vp, off_t size, off_t *eobp, int flags)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue