summaryrefslogtreecommitdiffstats
path: root/sys/dev/softraid.c
diff options
context:
space:
mode:
authorkrw <krw@openbsd.org>2015-07-29 12:58:16 +0000
committerkrw <krw@openbsd.org>2015-07-29 12:58:16 +0000
commit4ab51bfe1be9bed595548d8faef92504c28f187a (patch)
treed3213724b418875180ca92eb0d5caaf53a46cb7e /sys/dev/softraid.c
parentstatus_out and associated data structures are no longer used. (diff)
downloadwireguard-openbsd-4ab51bfe1be9bed595548d8faef92504c28f187a.tar.xz
wireguard-openbsd-4ab51bfe1be9bed595548d8faef92504c28f187a.zip
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/dev/softraid.c')
-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;