diff options
| author | pk <pk@NetBSD.org> | 2003-02-05 21:38:38 +0000 |
|---|---|---|
| committer | pk <pk@NetBSD.org> | 2003-02-05 21:38:38 +0000 |
| commit | 338f31f581b40d12e472e5c29223dfca09288dc1 (patch) | |
| tree | c2b42af6bf7323dfe9bf15936a6b11f3e40af2be /sys/dev/raidframe | |
| parent | 09843e3b7e65392c6f7a1265fce8e27b17c75bb9 (diff) | |
Make the buffer cache code MP-safe.
Diffstat (limited to 'sys/dev/raidframe')
| -rw-r--r-- | sys/dev/raidframe/rf_netbsdkintf.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/sys/dev/raidframe/rf_netbsdkintf.c b/sys/dev/raidframe/rf_netbsdkintf.c index a4ab55c2959..aeae2b9712f 100644 --- a/sys/dev/raidframe/rf_netbsdkintf.c +++ b/sys/dev/raidframe/rf_netbsdkintf.c @@ -1,4 +1,4 @@ -/* $NetBSD: rf_netbsdkintf.c,v 1.153 2003/02/01 06:23:40 thorpej Exp $ */ +/* $NetBSD: rf_netbsdkintf.c,v 1.154 2003/02/05 21:38:40 pk Exp $ */ /*- * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc. * All rights reserved. @@ -111,7 +111,7 @@ ***********************************************************/ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.153 2003/02/01 06:23:40 thorpej Exp $"); +__KERNEL_RCSID(0, "$NetBSD: rf_netbsdkintf.c,v 1.154 2003/02/05 21:38:40 pk Exp $"); #include <sys/param.h> #include <sys/errno.h> @@ -1835,6 +1835,12 @@ rf_DispatchKernelIO(queue, req) } #endif raidbp = pool_get(&raidframe_cbufpool, PR_NOWAIT); + if (raidbp == NULL) { + bp->b_flags |= B_ERROR; + bp->b_error = ENOMEM; + return (ENOMEM); + } + simple_lock_init(&raidbp->rf_buf.b_interlock); /* * context for raidiodone |
