summaryrefslogtreecommitdiffstats
path: root/sys/geom/raid/md_sii.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/geom/raid/md_sii.c')
-rw-r--r--sys/geom/raid/md_sii.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/geom/raid/md_sii.c b/sys/geom/raid/md_sii.c
index 149b336..5012dc5 100644
--- a/sys/geom/raid/md_sii.c
+++ b/sys/geom/raid/md_sii.c
@@ -923,15 +923,12 @@ g_raid_md_taste_sii(struct g_raid_md_object *md, struct g_class *mp,
/* Read metadata from device. */
meta = NULL;
vendor = 0xffff;
- if (g_access(cp, 1, 0, 0) != 0)
- return (G_RAID_MD_TASTE_FAIL);
g_topology_unlock();
len = 2;
if (pp->geom->rank == 1)
g_io_getattr("GEOM::hba_vendor", cp, &len, &vendor);
meta = sii_meta_read(cp);
g_topology_lock();
- g_access(cp, -1, 0, 0);
if (meta == NULL) {
if (g_raid_aggressive_spare) {
if (vendor == 0x1095) {
@@ -1011,6 +1008,9 @@ search:
G_RAID_DEBUG1(1, sc, "root_mount_hold %p", mdi->mdio_rootmount);
}
+ /* There is no return after this point, so we close passed consumer. */
+ g_access(cp, -1, 0, 0);
+
rcp = g_new_consumer(geom);
rcp->flags |= G_CF_DIRECT_RECEIVE;
g_attach(rcp, pp);
OpenPOWER on IntegriCloud