diff options
author | Pedro Martelletto <pedro@cvs.openbsd.org> | 2005-11-19 02:18:03 +0000 |
---|---|---|
committer | Pedro Martelletto <pedro@cvs.openbsd.org> | 2005-11-19 02:18:03 +0000 |
commit | 4e00bfe9e4fce563a74dcd487149539b6bc02ba9 (patch) | |
tree | a134970c4687287588758bb78c439e9cde819bb9 /sys/isofs | |
parent | 16017b33d1fad6b6fd295f39b365b33719b42ae9 (diff) |
Remove unnecessary lockmgr() archaism that was costing too much in terms
of panics and bugfixes. Access curproc directly, do not expect a process
pointer as an argument. Should fix many "process context required" bugs.
Incentive and okay millert@, okay marc@. Various testing, thanks.
Diffstat (limited to 'sys/isofs')
-rw-r--r-- | sys/isofs/cd9660/cd9660_node.c | 6 | ||||
-rw-r--r-- | sys/isofs/cd9660/cd9660_vnops.c | 7 | ||||
-rw-r--r-- | sys/isofs/udf/udf_vnops.c | 7 |
3 files changed, 9 insertions, 11 deletions
diff --git a/sys/isofs/cd9660/cd9660_node.c b/sys/isofs/cd9660/cd9660_node.c index 1157acdd349..f7c6abda357 100644 --- a/sys/isofs/cd9660/cd9660_node.c +++ b/sys/isofs/cd9660/cd9660_node.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_node.c,v 1.14 2003/06/02 23:28:05 millert Exp $ */ +/* $OpenBSD: cd9660_node.c,v 1.15 2005/11/19 02:18:01 pedro Exp $ */ /* $NetBSD: cd9660_node.c,v 1.17 1997/05/05 07:13:57 mycroft Exp $ */ /*- @@ -181,7 +181,6 @@ int cd9660_ihashins(ip) struct iso_node *ip; { - struct proc *p = curproc; struct iso_node **ipp, *iq; simple_lock(&cd9660_ihash_slock); @@ -200,7 +199,8 @@ cd9660_ihashins(ip) *ipp = ip; simple_unlock(&cd9660_ihash_slock); - lockmgr(&ip->i_lock, LK_EXCLUSIVE, 0, p); + lockmgr(&ip->i_lock, LK_EXCLUSIVE, NULL); + return (0); } diff --git a/sys/isofs/cd9660/cd9660_vnops.c b/sys/isofs/cd9660/cd9660_vnops.c index 3d6db24113d..c21d5cc0a88 100644 --- a/sys/isofs/cd9660/cd9660_vnops.c +++ b/sys/isofs/cd9660/cd9660_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cd9660_vnops.c,v 1.32 2004/11/29 17:05:05 grange Exp $ */ +/* $OpenBSD: cd9660_vnops.c,v 1.33 2005/11/19 02:18:01 pedro Exp $ */ /* $NetBSD: cd9660_vnops.c,v 1.42 1997/10/16 23:56:57 christos Exp $ */ /*- @@ -872,8 +872,7 @@ cd9660_lock(v) } */ *ap = v; struct vnode *vp = ap->a_vp; - return (lockmgr(&VTOI(vp)->i_lock, ap->a_flags, &vp->v_interlock, - ap->a_p)); + return (lockmgr(&VTOI(vp)->i_lock, ap->a_flags, &vp->v_interlock)); } /* @@ -889,7 +888,7 @@ cd9660_unlock(v) struct vnode *vp = ap->a_vp; return (lockmgr(&VTOI(vp)->i_lock, ap->a_flags | LK_RELEASE, - &vp->v_interlock, ap->a_p)); + &vp->v_interlock)); } /* diff --git a/sys/isofs/udf/udf_vnops.c b/sys/isofs/udf/udf_vnops.c index fe1f66c570f..cf197034885 100644 --- a/sys/isofs/udf/udf_vnops.c +++ b/sys/isofs/udf/udf_vnops.c @@ -1,4 +1,4 @@ -/* $OpenBSD: udf_vnops.c,v 1.8 2005/10/29 00:17:19 pedro Exp $ */ +/* $OpenBSD: udf_vnops.c,v 1.9 2005/11/19 02:18:01 pedro Exp $ */ /* * Copyright (c) 2001, 2002 Scott Long <scottl@freebsd.org> @@ -915,8 +915,7 @@ udf_lock(void *v) struct vnode *vp = ap->a_vp; - return (lockmgr(&VTON(vp)->i_lock, ap->a_flags, &vp->v_interlock, - ap->a_p)); + return (lockmgr(&VTON(vp)->i_lock, ap->a_flags, &vp->v_interlock)); } int @@ -931,7 +930,7 @@ udf_unlock(void *v) struct vnode *vp = ap->a_vp; return (lockmgr(&VTON(vp)->i_lock, ap->a_flags | LK_RELEASE, - &vp->v_interlock, ap->a_p)); + &vp->v_interlock)); } int |