diff options
author | Marco Peereboom <marco@cvs.openbsd.org> | 2008-06-12 01:26:17 +0000 |
---|---|---|
committer | Marco Peereboom <marco@cvs.openbsd.org> | 2008-06-12 01:26:17 +0000 |
commit | 4c0f84ed5e0e5e5b4837409250e4fccb2fcad08c (patch) | |
tree | bd92cbfbb86d9b27cf49af75f6295a923b63121c /sys/dev | |
parent | 6f7c94715bd08c2a2854d25191dd26826c3a9f6a (diff) |
Be more paranoid before disestablishing hook
ok hshoexer
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/softraid.c | 5 |
1 files changed, 3 insertions, 2 deletions
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 <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -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); |