Use ltsleep(...,PNORELOCK..) instead of simple_unlock()/tsleep()
This commit is contained in:
parent
fe7a6531b0
commit
861fcc44b7
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vfs_subr.c,v 1.133 2000/07/16 21:07:24 fvdl Exp $ */
|
||||
/* $NetBSD: vfs_subr.c,v 1.134 2000/08/12 16:43:01 sommerfeld Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||
@ -1082,8 +1082,8 @@ vget(vp, flags)
|
||||
simple_lock(&vp->v_interlock);
|
||||
if (vp->v_flag & VXLOCK) {
|
||||
vp->v_flag |= VXWANT;
|
||||
simple_unlock(&vp->v_interlock);
|
||||
tsleep((caddr_t)vp, PINOD, "vget", 0);
|
||||
ltsleep((caddr_t)vp, PINOD|PNORELOCK,
|
||||
"vget", 0, &vp->v_interlock);
|
||||
return (ENOENT);
|
||||
}
|
||||
if (vp->v_usecount == 0) {
|
||||
@ -1571,8 +1571,8 @@ vgonel(vp, p)
|
||||
*/
|
||||
if (vp->v_flag & VXLOCK) {
|
||||
vp->v_flag |= VXWANT;
|
||||
simple_unlock(&vp->v_interlock);
|
||||
tsleep((caddr_t)vp, PINOD, "vgone", 0);
|
||||
ltsleep((caddr_t)vp, PINOD | PNORELOCK,
|
||||
"vgone", 0, &vp->v_interlock);
|
||||
return;
|
||||
}
|
||||
/*
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: vfs_vnops.c,v 1.43 2000/06/27 17:41:54 mrg Exp $ */
|
||||
/* $NetBSD: vfs_vnops.c,v 1.44 2000/08/12 16:43:00 sommerfeld Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1989, 1993
|
||||
@ -578,8 +578,8 @@ vn_lock(vp, flags)
|
||||
simple_lock(&vp->v_interlock);
|
||||
if (vp->v_flag & VXLOCK) {
|
||||
vp->v_flag |= VXWANT;
|
||||
simple_unlock(&vp->v_interlock);
|
||||
tsleep((caddr_t)vp, PINOD, "vn_lock", 0);
|
||||
ltsleep((caddr_t)vp, PINOD | PNORELOCK,
|
||||
"vn_lock", 0, &vp->v_interlock);
|
||||
error = ENOENT;
|
||||
} else {
|
||||
error = VOP_LOCK(vp, flags | LK_INTERLOCK);
|
||||
|
Loading…
Reference in New Issue
Block a user