summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2015-07-29 12:58:17 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2015-07-29 12:58:17 +0000
commitdba5db0765a56c684bec09714c9f2cf2de50e718 (patch)
tree5ae48e1a702118a123ba61a85fe919ee2e847c0f /sys
parent35527b69a3738b278c75bded59daa5b74c72e988 (diff)
Zap a SLIST in a more obviously correct/safe way.
Originally from pelikan@, recent prodding from bluhm@ and jsg@. ok pelikan@ millert@ bluhm@
Diffstat (limited to 'sys')
-rw-r--r--sys/dev/softraid.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c
index c4517bcae6f..342d21a3a71 100644
--- a/sys/dev/softraid.c
+++ b/sys/dev/softraid.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: softraid.c,v 1.362 2015/07/28 15:42:23 krw Exp $ */
+/* $OpenBSD: softraid.c,v 1.363 2015/07/29 12:58:16 krw Exp $ */
/*
* Copyright (c) 2007, 2008, 2009 Marco Peereboom <marco@peereboom.us>
* Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org>
@@ -267,8 +267,7 @@ sr_meta_attach(struct sr_discipline *sd, int chunk_no, int force)
goto bad;
/* Force chunks into correct order now that metadata is attached. */
- SLIST_FOREACH(ch_entry, cl, src_link)
- SLIST_REMOVE(cl, ch_entry, sr_chunk, src_link);
+ SLIST_INIT(cl);
for (i = 0; i < chunk_no; i++) {
ch_entry = sd->sd_vol.sv_chunks[i];
chunk2 = NULL;