Fix order of lock assertions in union_lock() and union_removed_upper().
Sprinkle a few vprint()s. From John Kohl.
This commit is contained in:
parent
d271dac88d
commit
eb310b67a7
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: union_subr.c,v 1.9 1995/03/11 06:14:28 mycroft Exp $ */
|
||||
/* $NetBSD: union_subr.c,v 1.10 1995/05/30 08:51:24 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Jan-Simon Pendry
|
||||
@ -950,15 +950,15 @@ union_removed_upper(un)
|
||||
struct union_node *un;
|
||||
{
|
||||
|
||||
if (un->un_flags & UN_ULOCK) {
|
||||
un->un_flags &= ~UN_ULOCK;
|
||||
VOP_UNLOCK(un->un_uppervp);
|
||||
}
|
||||
|
||||
if (un->un_flags & UN_CACHED) {
|
||||
un->un_flags &= ~UN_CACHED;
|
||||
LIST_REMOVE(un, un_cache);
|
||||
}
|
||||
|
||||
if (un->un_flags & UN_ULOCK) {
|
||||
un->un_flags &= ~UN_ULOCK;
|
||||
VOP_UNLOCK(un->un_uppervp);
|
||||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: union_vnops.c,v 1.19 1994/12/29 22:48:20 mycroft Exp $ */
|
||||
/* $NetBSD: union_vnops.c,v 1.20 1995/05/30 08:51:27 mycroft Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1992, 1993, 1994 The Regents of the University of California.
|
||||
@ -1353,12 +1353,14 @@ start:
|
||||
if (un->un_uppervp != NULLVP) {
|
||||
if (((un->un_flags & UN_ULOCK) == 0) &&
|
||||
(vp->v_usecount != 0)) {
|
||||
un->un_flags |= UN_ULOCK;
|
||||
VOP_LOCK(un->un_uppervp);
|
||||
un->un_flags |= UN_ULOCK;
|
||||
}
|
||||
#ifdef DIAGNOSTIC
|
||||
if (un->un_flags & UN_KLOCK)
|
||||
if (un->un_flags & UN_KLOCK) {
|
||||
vprintf("dangling upper lock", vp);
|
||||
panic("union: dangling upper lock");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -1453,6 +1455,10 @@ union_print(ap)
|
||||
|
||||
printf("\ttag VT_UNION, vp=%x, uppervp=%x, lowervp=%x\n",
|
||||
vp, UPPERVP(vp), LOWERVP(vp));
|
||||
if (UPPERVP(vp))
|
||||
vprintf("uppervp", UPPERVP(vp));
|
||||
if (LOWERVP(vp))
|
||||
vprintf("lowervp", LOWERVP(vp));
|
||||
return (0);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user