diff options
author | Joel Sing <jsing@cvs.openbsd.org> | 2011-07-06 17:37:23 +0000 |
---|---|---|
committer | Joel Sing <jsing@cvs.openbsd.org> | 2011-07-06 17:37:23 +0000 |
commit | 635ee5e48506ce1967f267ad9a18b7e91bbcc779 (patch) | |
tree | a39cb0790efc8731444c338b5c8f992af5f18a45 /sys/dev/softraid.c | |
parent | c20d6c3243d55487e27229660f94d832b077af15 (diff) |
When checking if a chunk is in use, do not match on NODEV.
Diffstat (limited to 'sys/dev/softraid.c')
-rw-r--r-- | sys/dev/softraid.c | 7 |
1 files changed, 6 insertions, 1 deletions
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 <marco@peereboom.us> * Copyright (c) 2008 Chris Kuethe <ckuethe@openbsd.org> @@ -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) |