diff options
author | mav <mav@FreeBSD.org> | 2016-03-20 23:54:59 +0000 |
---|---|---|
committer | mav <mav@FreeBSD.org> | 2016-03-20 23:54:59 +0000 |
commit | 70ee7f1074214d490923b472b7b64288d02c6507 (patch) | |
tree | 6b50ce6ac33bb5c8adae1826906b245d1e783c9e /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c | |
parent | 04fd939370d04dc1f99c8b2bf7d7d46da88cbc5d (diff) | |
download | FreeBSD-src-70ee7f1074214d490923b472b7b64288d02c6507.zip FreeBSD-src-70ee7f1074214d490923b472b7b64288d02c6507.tar.gz |
MFC r294805: MFV r294804:
6386 Fix function call with uninitialized value in vdev_inuse
Reviewed by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Dan Kimmel <dan.kimmel@delphix.com>
Approved by: Robert Mustacchi <rm@joyent.com>
Author: Richard Yao <ryao@gentoo.org>
illumos/illumos-gate@5bdd995ddb777f538bfbcc5e2d5ff1bed07ae56e
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c index 9befa75..05dcfb4 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_label.c @@ -602,7 +602,8 @@ vdev_inuse(vdev_t *vd, uint64_t crtxg, vdev_labeltype_t reason, * read-only. Instead we look to see if the pools is marked * read-only in the namespace and set the state to active. */ - if ((spa = spa_by_guid(pool_guid, device_guid)) != NULL && + if (state != POOL_STATE_SPARE && state != POOL_STATE_L2CACHE && + (spa = spa_by_guid(pool_guid, device_guid)) != NULL && spa_mode(spa) == FREAD) state = POOL_STATE_ACTIVE; |