Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 11 Oct 2018 15:12:11 +0000 (UTC)
From:      Alexander Motin <mav@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-11@freebsd.org
Subject:   svn commit: r339306 - stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201810111512.w9BFCBR8040536@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mav
Date: Thu Oct 11 15:12:10 2018
New Revision: 339306
URL: https://svnweb.freebsd.org/changeset/base/339306

Log:
  MFC r339237: Fix r336951 mismerge -- use of uninitialized variable.

Modified:
  stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c
==============================================================================
--- stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c	Thu Oct 11 13:58:51 2018	(r339305)
+++ stable/11/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_scan.c	Thu Oct 11 15:12:10 2018	(r339306)
@@ -2960,6 +2960,8 @@ dsl_scan_need_resilver(spa_t *spa, const dva_t *dva, s
 {
 	vdev_t *vd;
 
+	vd = vdev_lookup_top(spa, DVA_GET_VDEV(dva));
+
 	if (vd->vdev_ops == &vdev_indirect_ops) {
 		/*
 		 * The indirect vdev can point to multiple
@@ -2970,6 +2972,7 @@ dsl_scan_need_resilver(spa_t *spa, const dva_t *dva, s
 		 */
 		return (B_TRUE);
 	}
+
 	if (DVA_GET_GANG(dva)) {
 		/*
 		 * Gang members may be spread across multiple
@@ -2981,8 +2984,6 @@ dsl_scan_need_resilver(spa_t *spa, const dva_t *dva, s
 		 */
 		return (B_TRUE);
 	}
-
-	vd = vdev_lookup_top(spa, DVA_GET_VDEV(dva));
 
 	/*
 	 * Check if the txg falls within the range which must be



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201810111512.w9BFCBR8040536>