summaryrefslogtreecommitdiff
path: root/sys/arch/octeon/dev
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2011-06-19 04:55:35 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2011-06-19 04:55:35 +0000
commit3e3ad7757f379f859cf5f09cbb7aa83f78364b19 (patch)
tree295c545f0e41cbdb975ac2a060c71d9b5f07b0be /sys/arch/octeon/dev
parenta809e4c7b624b56c125ce1320f4ad1bc5958112b (diff)
Use disk_lock_nointr() in the xxclose() routines so that they cannot
be interrupted. ok matthew
Diffstat (limited to 'sys/arch/octeon/dev')
-rw-r--r--sys/arch/octeon/dev/octcf.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/sys/arch/octeon/dev/octcf.c b/sys/arch/octeon/dev/octcf.c
index 208fcff2b82..a6879e15e0f 100644
--- a/sys/arch/octeon/dev/octcf.c
+++ b/sys/arch/octeon/dev/octcf.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: octcf.c,v 1.5 2011/06/19 04:35:06 deraadt Exp $ */
+/* $OpenBSD: octcf.c,v 1.6 2011/06/19 04:55:34 deraadt Exp $ */
/* $NetBSD: wd.c,v 1.193 1999/02/28 17:15:27 explorer Exp $ */
/*
@@ -510,15 +510,14 @@ octcfclose(dev_t dev, int flag, int fmt, struct proc *p)
{
struct octcf_softc *wd;
int part = DISKPART(dev);
- int error = 0;
wd = octcflookup(DISKUNIT(dev));
if (wd == NULL)
return ENXIO;
OCTCFDEBUG_PRINT(("octcfclose\n"), DEBUG_FUNCS);
- if ((error = disk_lock(&wd->sc_dk)) != 0)
- goto exit;
+
+ disk_lock_nointr(&wd->sc_dk);
switch (fmt) {
case S_IFCHR:
@@ -533,9 +532,8 @@ octcfclose(dev_t dev, int flag, int fmt, struct proc *p)
disk_unlock(&wd->sc_dk);
- exit:
device_unref(&wd->sc_dev);
- return (error);
+ return (0);
}
void