Module Name: src Committed By: pooka Date: Fri Jan 8 13:07:26 UTC 2010
Modified Files: src/sys/kern: vfs_subr.c src/sys/sys: vnode.h Log Message: vcount() lost its purpose when opening multiple block devices was made impossible, oh, two years ago. nuke it (yes, the interface name is overgeneric). To generate a diff of this commit: cvs rdiff -u -r1.394 -r1.395 src/sys/kern/vfs_subr.c cvs rdiff -u -r1.211 -r1.212 src/sys/sys/vnode.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/kern/vfs_subr.c diff -u src/sys/kern/vfs_subr.c:1.394 src/sys/kern/vfs_subr.c:1.395 --- src/sys/kern/vfs_subr.c:1.394 Fri Jan 8 11:35:10 2010 +++ src/sys/kern/vfs_subr.c Fri Jan 8 13:07:26 2010 @@ -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. */ Index: src/sys/sys/vnode.h diff -u src/sys/sys/vnode.h:1.211 src/sys/sys/vnode.h:1.212 --- src/sys/sys/vnode.h:1.211 Fri Jan 8 11:35:11 2010 +++ src/sys/sys/vnode.h Fri Jan 8 13:07:26 2010 @@ -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);