mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-04 09:09:56 +00:00
Deleted KLOCK-hack.
This commit is contained in:
parent
aa76a48760
commit
589421d418
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=33844
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)union.h 8.9 (Berkeley) 12/10/94
|
||||
* $Id: union.h,v 1.10 1998/01/20 10:02:50 kato Exp $
|
||||
* $Id: union.h,v 1.11 1998/02/10 03:32:03 kato Exp $
|
||||
*/
|
||||
|
||||
struct union_args {
|
||||
@ -93,10 +93,6 @@ struct union_node {
|
||||
#define UN_ULOCK 0x04 /* Upper node is locked */
|
||||
#define UN_KLOCK 0x08 /* Keep upper node locked on vput */
|
||||
#define UN_CACHED 0x10 /* In union cache */
|
||||
#define UN_GLOCK 0x20 /* Keep upper node locked on vget */
|
||||
|
||||
#define SETGLOCK(un) (un)->un_flags |= UN_GLOCK
|
||||
#define CLEARGLOCK(un) (un)->un_flags &= ~UN_GLOCK
|
||||
|
||||
extern int union_allocvp __P((struct vnode **, struct mount *,
|
||||
struct vnode *, struct vnode *,
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)union_subr.c 8.20 (Berkeley) 5/20/95
|
||||
* $Id: union_subr.c,v 1.27 1998/02/06 12:13:44 eivind Exp $
|
||||
* $Id: union_subr.c,v 1.28 1998/02/10 03:32:05 kato Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -363,27 +363,11 @@ union_allocvp(vpp, mp, undvp, dvp, cnp, uppervp, lowervp, docache)
|
||||
(un->un_uppervp == uppervp ||
|
||||
un->un_uppervp == NULLVP) &&
|
||||
(UNIONTOV(un)->v_mount == mp)) {
|
||||
/*
|
||||
* Do not assume that vget() does not
|
||||
* lock the vnode even though flags
|
||||
* argument is 0.
|
||||
*/
|
||||
if ((un->un_uppervp != NULLVP) &&
|
||||
((un->un_flags & UN_KLOCK) == 0)) {
|
||||
SETGLOCK(un);
|
||||
klocked = 1;
|
||||
} else {
|
||||
klocked = 0;
|
||||
}
|
||||
if (vget(UNIONTOV(un), 0,
|
||||
cnp ? cnp->cn_proc : NULL)) {
|
||||
if (klocked)
|
||||
CLEARGLOCK(un);
|
||||
union_list_unlock(hash);
|
||||
goto loop;
|
||||
}
|
||||
if (klocked)
|
||||
CLEARGLOCK(un);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)union_vnops.c 8.32 (Berkeley) 6/23/95
|
||||
* $Id: union_vnops.c,v 1.53 1998/02/06 12:13:44 eivind Exp $
|
||||
* $Id: union_vnops.c,v 1.54 1998/02/10 03:32:07 kato Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -1533,11 +1533,9 @@ union_lock(ap)
|
||||
if (un->un_uppervp != NULLVP) {
|
||||
if (((un->un_flags & UN_ULOCK) == 0) &&
|
||||
(vp->v_usecount != 0)) {
|
||||
if ((un->un_flags & UN_GLOCK) == 0) {
|
||||
error = vn_lock(un->un_uppervp, flags, p);
|
||||
if (error)
|
||||
return (error);
|
||||
}
|
||||
error = vn_lock(un->un_uppervp, flags, p);
|
||||
if (error)
|
||||
return (error);
|
||||
un->un_flags |= UN_ULOCK;
|
||||
}
|
||||
#ifdef DIAGNOSTIC
|
||||
@ -1602,7 +1600,7 @@ union_unlock(ap)
|
||||
|
||||
un->un_flags &= ~UN_LOCKED;
|
||||
|
||||
if ((un->un_flags & (UN_ULOCK|UN_KLOCK|UN_GLOCK)) == UN_ULOCK)
|
||||
if ((un->un_flags & (UN_ULOCK|UN_KLOCK)) == UN_ULOCK)
|
||||
VOP_UNLOCK(un->un_uppervp, 0, p);
|
||||
|
||||
un->un_flags &= ~(UN_ULOCK|UN_KLOCK);
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)union.h 8.9 (Berkeley) 12/10/94
|
||||
* $Id: union.h,v 1.10 1998/01/20 10:02:50 kato Exp $
|
||||
* $Id: union.h,v 1.11 1998/02/10 03:32:03 kato Exp $
|
||||
*/
|
||||
|
||||
struct union_args {
|
||||
@ -93,10 +93,6 @@ struct union_node {
|
||||
#define UN_ULOCK 0x04 /* Upper node is locked */
|
||||
#define UN_KLOCK 0x08 /* Keep upper node locked on vput */
|
||||
#define UN_CACHED 0x10 /* In union cache */
|
||||
#define UN_GLOCK 0x20 /* Keep upper node locked on vget */
|
||||
|
||||
#define SETGLOCK(un) (un)->un_flags |= UN_GLOCK
|
||||
#define CLEARGLOCK(un) (un)->un_flags &= ~UN_GLOCK
|
||||
|
||||
extern int union_allocvp __P((struct vnode **, struct mount *,
|
||||
struct vnode *, struct vnode *,
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)union_subr.c 8.20 (Berkeley) 5/20/95
|
||||
* $Id: union_subr.c,v 1.27 1998/02/06 12:13:44 eivind Exp $
|
||||
* $Id: union_subr.c,v 1.28 1998/02/10 03:32:05 kato Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -363,27 +363,11 @@ union_allocvp(vpp, mp, undvp, dvp, cnp, uppervp, lowervp, docache)
|
||||
(un->un_uppervp == uppervp ||
|
||||
un->un_uppervp == NULLVP) &&
|
||||
(UNIONTOV(un)->v_mount == mp)) {
|
||||
/*
|
||||
* Do not assume that vget() does not
|
||||
* lock the vnode even though flags
|
||||
* argument is 0.
|
||||
*/
|
||||
if ((un->un_uppervp != NULLVP) &&
|
||||
((un->un_flags & UN_KLOCK) == 0)) {
|
||||
SETGLOCK(un);
|
||||
klocked = 1;
|
||||
} else {
|
||||
klocked = 0;
|
||||
}
|
||||
if (vget(UNIONTOV(un), 0,
|
||||
cnp ? cnp->cn_proc : NULL)) {
|
||||
if (klocked)
|
||||
CLEARGLOCK(un);
|
||||
union_list_unlock(hash);
|
||||
goto loop;
|
||||
}
|
||||
if (klocked)
|
||||
CLEARGLOCK(un);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,7 @@
|
||||
* SUCH DAMAGE.
|
||||
*
|
||||
* @(#)union_vnops.c 8.32 (Berkeley) 6/23/95
|
||||
* $Id: union_vnops.c,v 1.53 1998/02/06 12:13:44 eivind Exp $
|
||||
* $Id: union_vnops.c,v 1.54 1998/02/10 03:32:07 kato Exp $
|
||||
*/
|
||||
|
||||
#include <sys/param.h>
|
||||
@ -1533,11 +1533,9 @@ union_lock(ap)
|
||||
if (un->un_uppervp != NULLVP) {
|
||||
if (((un->un_flags & UN_ULOCK) == 0) &&
|
||||
(vp->v_usecount != 0)) {
|
||||
if ((un->un_flags & UN_GLOCK) == 0) {
|
||||
error = vn_lock(un->un_uppervp, flags, p);
|
||||
if (error)
|
||||
return (error);
|
||||
}
|
||||
error = vn_lock(un->un_uppervp, flags, p);
|
||||
if (error)
|
||||
return (error);
|
||||
un->un_flags |= UN_ULOCK;
|
||||
}
|
||||
#ifdef DIAGNOSTIC
|
||||
@ -1602,7 +1600,7 @@ union_unlock(ap)
|
||||
|
||||
un->un_flags &= ~UN_LOCKED;
|
||||
|
||||
if ((un->un_flags & (UN_ULOCK|UN_KLOCK|UN_GLOCK)) == UN_ULOCK)
|
||||
if ((un->un_flags & (UN_ULOCK|UN_KLOCK)) == UN_ULOCK)
|
||||
VOP_UNLOCK(un->un_uppervp, 0, p);
|
||||
|
||||
un->un_flags &= ~(UN_ULOCK|UN_KLOCK);
|
||||
|
Loading…
Reference in New Issue
Block a user