vcount() lost its purpose when opening multiple block devices was

made impossible, oh, two years ago.  nuke it (yes, the interface
name is overgeneric).
This commit is contained in:
pooka 2010-01-08 13:07:26 +00:00
parent adaa722591
commit 113544b039
2 changed files with 3 additions and 26 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: vfs_subr.c,v 1.394 2010/01/08 11:35:10 pooka Exp $ */
/* $NetBSD: vfs_subr.c,v 1.395 2010/01/08 13:07:26 pooka Exp $ */
/*-
* Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc.
@ -91,7 +91,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.394 2010/01/08 11:35:10 pooka Exp $");
__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.395 2010/01/08 13:07:26 pooka Exp $");
#include "opt_ddb.h"
#include "opt_compat_netbsd.h"
@ -2030,28 +2030,6 @@ vdevgone(int maj, int minl, int minh, enum vtype type)
mutex_exit(&device_lock);
}
/*
* Calculate the total number of references to a special device.
*/
int
vcount(vnode_t *vp)
{
int count;
mutex_enter(&device_lock);
mutex_enter(&vp->v_interlock);
if (vp->v_specnode == NULL) {
count = vp->v_usecount - ((vp->v_iflag & VI_INACTPEND) != 0);
mutex_exit(&vp->v_interlock);
mutex_exit(&device_lock);
return (count);
}
mutex_exit(&vp->v_interlock);
count = vp->v_specnode->sn_dev->sd_opencnt;
mutex_exit(&device_lock);
return (count);
}
/*
* Eliminate all activity associated with the requested vnode
* and with all vnodes aliased to the requested vnode.

View File

@ -1,4 +1,4 @@
/* $NetBSD: vnode.h,v 1.211 2010/01/08 11:35:11 pooka Exp $ */
/* $NetBSD: vnode.h,v 1.212 2010/01/08 13:07:26 pooka Exp $ */
/*-
* Copyright (c) 2008 The NetBSD Foundation, Inc.
@ -588,7 +588,6 @@ int getnewvnode(enum vtagtype, struct mount *, int (**)(void *),
void ungetnewvnode(struct vnode *);
int vaccess(enum vtype, mode_t, uid_t, gid_t, mode_t, kauth_cred_t);
void vattr_null(struct vattr *);
int vcount(struct vnode *);
void vdevgone(int, int, int, enum vtype);
int vfinddev(dev_t, enum vtype, struct vnode **);
int vflush(struct mount *, struct vnode *, int);