From e058dda4f0a2ed23e62eb13c1eb83ed205146205 Mon Sep 17 00:00:00 2001 From: marco Date: Thu, 12 Jun 2008 01:26:16 +0000 Subject: Be more paranoid before disestablishing hook ok hshoexer --- sys/dev/softraid.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'sys/dev/softraid.c') diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index f192ae39fb2..3ea83e31c57 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.108 2008/06/12 00:19:15 marco Exp $ */ +/* $OpenBSD: softraid.c,v 1.109 2008/06/12 01:26:16 marco Exp $ */ /* * Copyright (c) 2007 Marco Peereboom * Copyright (c) 2008 Chris Kuethe @@ -1416,7 +1416,8 @@ sr_shutdown_discipline(struct sr_discipline *sd) s = splbio(); - shutdownhook_disestablish(sd->sd_shutdownhook); + if (sd->sd_shutdownhook) + shutdownhook_disestablish(sd->sd_shutdownhook); /* make sure there isn't a sync pending and yield */ wakeup(sd); -- cgit v1.2.3-59-g8ed1b