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.
|
* Copyright (c) 1997, 1998 The NetBSD Foundation, Inc.
|
||||||
@ -1082,8 +1082,8 @@ vget(vp, flags)
|
|||||||
simple_lock(&vp->v_interlock);
|
simple_lock(&vp->v_interlock);
|
||||||
if (vp->v_flag & VXLOCK) {
|
if (vp->v_flag & VXLOCK) {
|
||||||
vp->v_flag |= VXWANT;
|
vp->v_flag |= VXWANT;
|
||||||
simple_unlock(&vp->v_interlock);
|
ltsleep((caddr_t)vp, PINOD|PNORELOCK,
|
||||||
tsleep((caddr_t)vp, PINOD, "vget", 0);
|
"vget", 0, &vp->v_interlock);
|
||||||
return (ENOENT);
|
return (ENOENT);
|
||||||
}
|
}
|
||||||
if (vp->v_usecount == 0) {
|
if (vp->v_usecount == 0) {
|
||||||
@ -1571,8 +1571,8 @@ vgonel(vp, p)
|
|||||||
*/
|
*/
|
||||||
if (vp->v_flag & VXLOCK) {
|
if (vp->v_flag & VXLOCK) {
|
||||||
vp->v_flag |= VXWANT;
|
vp->v_flag |= VXWANT;
|
||||||
simple_unlock(&vp->v_interlock);
|
ltsleep((caddr_t)vp, PINOD | PNORELOCK,
|
||||||
tsleep((caddr_t)vp, PINOD, "vgone", 0);
|
"vgone", 0, &vp->v_interlock);
|
||||||
return;
|
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
|
* Copyright (c) 1982, 1986, 1989, 1993
|
||||||
@ -578,8 +578,8 @@ vn_lock(vp, flags)
|
|||||||
simple_lock(&vp->v_interlock);
|
simple_lock(&vp->v_interlock);
|
||||||
if (vp->v_flag & VXLOCK) {
|
if (vp->v_flag & VXLOCK) {
|
||||||
vp->v_flag |= VXWANT;
|
vp->v_flag |= VXWANT;
|
||||||
simple_unlock(&vp->v_interlock);
|
ltsleep((caddr_t)vp, PINOD | PNORELOCK,
|
||||||
tsleep((caddr_t)vp, PINOD, "vn_lock", 0);
|
"vn_lock", 0, &vp->v_interlock);
|
||||||
error = ENOENT;
|
error = ENOENT;
|
||||||
} else {
|
} else {
|
||||||
error = VOP_LOCK(vp, flags | LK_INTERLOCK);
|
error = VOP_LOCK(vp, flags | LK_INTERLOCK);
|
||||||
|
Loading…
Reference in New Issue
Block a user