vrevoke: fix a couple of botches.
This commit is contained in:
parent
661097a9a5
commit
95e0feb94e
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: vfs_subr.c,v 1.316 2008/01/17 17:28:55 ad Exp $ */
|
||||
/* $NetBSD: vfs_subr.c,v 1.317 2008/01/17 19:23:13 ad Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998, 2004, 2005, 2007, 2008 The NetBSD Foundation, Inc.
|
||||
|
@ -82,7 +82,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.316 2008/01/17 17:28:55 ad Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: vfs_subr.c,v 1.317 2008/01/17 19:23:13 ad Exp $");
|
||||
|
||||
#include "opt_inet.h"
|
||||
#include "opt_ddb.h"
|
||||
|
@ -1568,14 +1568,15 @@ vrevoke(vnode_t *vp)
|
|||
vpp = &speclisth[SPECHASH(dev)];
|
||||
mutex_enter(&spechash_lock);
|
||||
for (vq = *vpp; vq != NULL;) {
|
||||
if (vq->v_rdev != dev || vq->v_type != type) {
|
||||
if ((vq->v_iflag & VI_CLEAN) != 0 ||
|
||||
vq->v_rdev != dev || vq->v_type != type) {
|
||||
vq = vq->v_specnext;
|
||||
continue;
|
||||
}
|
||||
mutex_enter(&vq->v_interlock);
|
||||
mutex_exit(&spechash_lock);
|
||||
if (vq->v_usecount++ == 0) {
|
||||
vremfree(vp);
|
||||
vremfree(vq);
|
||||
}
|
||||
vclean(vq, DOCLOSE);
|
||||
vrelel(vq, 1, 0);
|
||||
|
|
Loading…
Reference in New Issue