Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys vcount() lost its purpose when opening multiple block de...
details: https://anonhg.NetBSD.org/src/rev/68f89a48dbcf
branches: trunk
changeset: 750618:68f89a48dbcf
user: pooka <pooka%NetBSD.org@localhost>
date: Fri Jan 08 13:07:26 2010 +0000
description:
vcount() lost its purpose when opening multiple block devices was
made impossible, oh, two years ago. nuke it (yes, the interface
name is overgeneric).
diffstat:
sys/kern/vfs_subr.c | 26 ++------------------------
sys/sys/vnode.h | 3 +--
2 files changed, 3 insertions(+), 26 deletions(-)
diffs (64 lines):
diff -r 2dd8b9a0d3a8 -r 68f89a48dbcf sys/kern/vfs_subr.c
--- a/sys/kern/vfs_subr.c Fri Jan 08 12:52:49 2010 +0000
+++ b/sys/kern/vfs_subr.c Fri Jan 08 13:07:26 2010 +0000
@@ -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"
@@ -2031,28 +2031,6 @@
}
/*
- * 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.
*/
diff -r 2dd8b9a0d3a8 -r 68f89a48dbcf sys/sys/vnode.h
--- a/sys/sys/vnode.h Fri Jan 08 12:52:49 2010 +0000
+++ b/sys/sys/vnode.h Fri Jan 08 13:07:26 2010 +0000
@@ -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 @@
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);
Home |
Main Index |
Thread Index |
Old Index