summaryrefslogtreecommitdiff
path: root/sys/adosfs/adutil.c
diff options
context:
space:
mode:
authorPedro Martelletto <pedro@cvs.openbsd.org>2005-11-19 02:18:03 +0000
committerPedro Martelletto <pedro@cvs.openbsd.org>2005-11-19 02:18:03 +0000
commit4e00bfe9e4fce563a74dcd487149539b6bc02ba9 (patch)
treea134970c4687287588758bb78c439e9cde819bb9 /sys/adosfs/adutil.c
parent16017b33d1fad6b6fd295f39b365b33719b42ae9 (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/adosfs/adutil.c')
-rw-r--r--sys/adosfs/adutil.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/adosfs/adutil.c b/sys/adosfs/adutil.c
index 80cfa6d73df..0b3cc2cf4bf 100644
--- a/sys/adosfs/adutil.c
+++ b/sys/adosfs/adutil.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: adutil.c,v 1.14 2003/12/21 15:28:59 miod Exp $ */
+/* $OpenBSD: adutil.c,v 1.15 2005/11/19 02:18:00 pedro Exp $ */
/* $NetBSD: adutil.c,v 1.15 1996/10/13 02:52:07 christos Exp $ */
/*
@@ -88,20 +88,17 @@ adosfs_ainshash(amp, ap)
struct adosfsmount *amp;
struct anode *ap;
{
- struct proc *p = curproc; /* XXX */
struct anodechain *hp;
struct anode *aq;
/* lock the inode, then put it on the appropriate hash list */
- lockmgr(&ap->a_lock, LK_EXCLUSIVE, (struct simplelock *)0, p);
+ lockmgr(&ap->a_lock, LK_EXCLUSIVE, NULL);
hp = &amp->anodetab[AHASH(ap->block)];
for (aq = hp->lh_first; aq ; aq = aq->link.le_next) {
if (aq->block == ap->block) {
- lockmgr(&ap->a_lock, LK_RELEASE,
- (struct simplelock *)0, p);
-
+ lockmgr(&ap->a_lock, LK_RELEASE, NULL);
return (EEXIST);
}
}