diff options
author | dyson <dyson@FreeBSD.org> | 1997-08-19 00:27:07 +0000 |
---|---|---|
committer | dyson <dyson@FreeBSD.org> | 1997-08-19 00:27:07 +0000 |
commit | 03ba12afe1091b81f6f14967da3302842700df2a (patch) | |
tree | 1e0b6d9fcaf14beb733eeef65e53fffff8055cd3 | |
parent | 065b1532d986d18de3ceed4f509708776ea01e81 (diff) | |
download | FreeBSD-src-03ba12afe1091b81f6f14967da3302842700df2a.zip FreeBSD-src-03ba12afe1091b81f6f14967da3302842700df2a.tar.gz |
Allow lockmgr to work without a current process. Disallowing that
was a mistake in the lockmgr rewrite.
-rw-r--r-- | sys/kern/kern_lock.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sys/kern/kern_lock.c b/sys/kern/kern_lock.c index 44b42f6..5f36fd4 100644 --- a/sys/kern/kern_lock.c +++ b/sys/kern/kern_lock.c @@ -38,7 +38,7 @@ * SUCH DAMAGE. * * @(#)kern_lock.c 8.18 (Berkeley) 5/21/95 - * $Id: kern_lock.c,v 1.8 1997/08/18 02:06:35 dyson Exp $ + * $Id: kern_lock.c,v 1.9 1997/08/18 03:29:15 fsmp Exp $ */ #include <sys/param.h> @@ -239,8 +239,9 @@ lockmgr(lkp, flags, interlkp, p) error = 0; if (p == NULL) - panic("lockmgr: called with null process"); - pid = p->p_pid; + pid = LK_KERNPROC; + else + pid = p->p_pid; simple_lock(&lkp->lk_interlock); if (flags & LK_INTERLOCK) |