summaryrefslogtreecommitdiff
path: root/sys/dev/raidframe
diff options
context:
space:
mode:
authoroster <oster@NetBSD.org>2004-01-14 15:10:55 +0000
committeroster <oster@NetBSD.org>2004-01-14 15:10:55 +0000
commit7ab3e4e2e305f39195eaf03b6627591029044e70 (patch)
tree3f3f6fa6c44330363b79d6acc8839152510e8e76 /sys/dev/raidframe
parent6353b12d1abee6a27855a1ad01b4a1c436f90188 (diff)
Add 2 missing RF_LOCK_MUTEX()es. Problem pointed out by
skrueger-at-europe-dot-com. (It turns out that the mutex used to serve two different purposes, not just one, and for its current use, it's actually miss-named. Will fix that some other time.)
Diffstat (limited to 'sys/dev/raidframe')
-rw-r--r--sys/dev/raidframe/rf_driver.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/raidframe/rf_driver.c b/sys/dev/raidframe/rf_driver.c
index 1b698cab561..4b92cfc62f6 100644
--- a/sys/dev/raidframe/rf_driver.c
+++ b/sys/dev/raidframe/rf_driver.c
@@ -1,4 +1,4 @@
-/* $NetBSD: rf_driver.c,v 1.82 2004/01/05 01:19:07 oster Exp $ */
+/* $NetBSD: rf_driver.c,v 1.83 2004/01/14 15:10:55 oster Exp $ */
/*-
* Copyright (c) 1999 The NetBSD Foundation, Inc.
* All rights reserved.
@@ -73,7 +73,7 @@
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.82 2004/01/05 01:19:07 oster Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rf_driver.c,v 1.83 2004/01/14 15:10:55 oster Exp $");
#include "opt_raid_diagnostic.h"
@@ -461,6 +461,7 @@ rf_AllocRaidAccDesc(RF_Raid_t *raidPtr, RF_IoType_t type,
desc = pool_get(&rf_rad_pool, PR_WAITOK);
simple_lock_init(&desc->mutex);
+ RF_LOCK_MUTEX(rf_rad_pool_lock);
if (raidPtr->waitShutdown) {
/*
* Actually, we're shutting the array down. Free the desc
@@ -506,6 +507,7 @@ rf_FreeRaidAccDesc(RF_RaidAccessDesc_t *desc)
rf_FreeAllocList(desc->cleanupList);
pool_put(&rf_rad_pool, desc);
+ RF_LOCK_MUTEX(rf_rad_pool_lock);
raidPtr->nAccOutstanding--;
if (raidPtr->waitShutdown) {
RF_SIGNAL_COND(raidPtr->outstandingCond);