Author: mav
Date: Tue Jan 26 12:49:31 2016
New Revision: 294804
URL: https://svnweb.freebsd.org/changeset/base/294804

Log:
  6386 Fix function call with uninitialized value in vdev_inuse
  
  Reviewed by: Brian Behlendorf <[email protected]>
  Reviewed by: Matthew Ahrens <[email protected]>
  Reviewed by: Dan Kimmel <[email protected]>
  Approved by: Robert Mustacchi <[email protected]>
  Author: Richard Yao <[email protected]>
  
  illumos/illumos-gate@5bdd995ddb777f538bfbcc5e2d5ff1bed07ae56e

Modified:
  vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_label.c

Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_label.c
==============================================================================
--- vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_label.c      Tue Jan 26 
12:48:10 2016        (r294803)
+++ vendor-sys/illumos/dist/uts/common/fs/zfs/vdev_label.c      Tue Jan 26 
12:49:31 2016        (r294804)
@@ -596,7 +596,8 @@ vdev_inuse(vdev_t *vd, uint64_t crtxg, v
         * 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;
 
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "[email protected]"

Reply via email to