From 3e3ad7757f379f859cf5f09cbb7aa83f78364b19 Mon Sep 17 00:00:00 2001 From: Theo de Raadt Date: Sun, 19 Jun 2011 04:55:35 +0000 Subject: Use disk_lock_nointr() in the xxclose() routines so that they cannot be interrupted. ok matthew --- sys/arch/hp300/dev/hd.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'sys/arch/hp300/dev') diff --git a/sys/arch/hp300/dev/hd.c b/sys/arch/hp300/dev/hd.c index c742eb48971..b15bf3ddcf5 100644 --- a/sys/arch/hp300/dev/hd.c +++ b/sys/arch/hp300/dev/hd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: hd.c,v 1.66 2011/06/19 04:35:06 deraadt Exp $ */ +/* $OpenBSD: hd.c,v 1.67 2011/06/19 04:55:34 deraadt Exp $ */ /* $NetBSD: rd.c,v 1.33 1997/07/10 18:14:08 kleink Exp $ */ /* @@ -602,16 +602,12 @@ hdclose(dev, flag, mode, p) struct hd_softc *rs; struct disk *dk; int mask, s; - int error; rs = hdlookup(unit); if (rs == NULL) return (ENXIO); - if ((error = disk_lock(&rs->sc_dkdev)) != 0) { - device_unref(&rs->sc_dev); - return (error); - } + disk_lock_nointr(&rs->sc_dkdev); mask = 1 << DISKPART(dev); dk = &rs->sc_dkdev; -- cgit v1.2.3