From 635ee5e48506ce1967f267ad9a18b7e91bbcc779 Mon Sep 17 00:00:00 2001 From: Joel Sing Date: Wed, 6 Jul 2011 17:37:23 +0000 Subject: When checking if a chunk is in use, do not match on NODEV. --- sys/dev/softraid.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'sys/dev/softraid.c') diff --git a/sys/dev/softraid.c b/sys/dev/softraid.c index 5486f04b2e9..e99b8f50cf4 100644 --- a/sys/dev/softraid.c +++ b/sys/dev/softraid.c @@ -1,4 +1,4 @@ -/* $OpenBSD: softraid.c,v 1.240 2011/07/06 17:32:47 jsing Exp $ */ +/* $OpenBSD: softraid.c,v 1.241 2011/07/06 17:37:22 jsing Exp $ */ /* * Copyright (c) 2007, 2008, 2009 Marco Peereboom * Copyright (c) 2008 Chris Kuethe @@ -2385,6 +2385,11 @@ sr_chunk_in_use(struct sr_softc *sc, dev_t dev) struct sr_chunk *chunk; int i, c; + DNPRINTF(SR_D_MISC, "%s: sr_chunk_in_use(%d)\n", DEVNAME(sc), dev); + + if (dev == NODEV) + return BIOC_SDINVALID; + /* See if chunk is already in use. */ for (i = 0; i < SR_MAX_LD; i++) { if (sc->sc_dis[i] == NULL) -- cgit v1.2.3