Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 23 Dec 2012 19:58:41 +0000 (UTC)
From:      Andriy Gapon <avg@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r244635 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Message-ID:  <201212231958.qBNJwfkJ057541@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: avg
Date: Sun Dec 23 19:58:41 2012
New Revision: 244635
URL: http://svnweb.freebsd.org/changeset/base/244635

Log:
  zfs: solaris doesn't have KM_ZERO, kmem_zalloc should be used instead
  
  To do:		remove KM_ZERO declaration
  Pointyhat to:	avg (for mindlessly using the pseudo-flag)
  MFC after:	instantly (to fix stable/8 build)

Modified:
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
  head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c	Sun Dec 23 18:35:42 2012	(r244634)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/spa.c	Sun Dec 23 19:58:41 2012	(r244635)
@@ -3799,7 +3799,7 @@ spa_generate_rootconf(const char *name)
 	nvlist_lookup_uint64_array(best_cfg, ZPOOL_CONFIG_HOLE_ARRAY,
 	    &holes, &nholes);
 
-	tops = kmem_alloc(nchildren * sizeof(void *), KM_SLEEP | KM_ZERO);
+	tops = kmem_zalloc(nchildren * sizeof(void *), KM_SLEEP);
 	for (i = 0; i < nchildren; i++) {
 		if (i >= count)
 			break;

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c	Sun Dec 23 18:35:42 2012	(r244634)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c	Sun Dec 23 19:58:41 2012	(r244635)
@@ -300,8 +300,8 @@ resize_configs(nvlist_t ***configs, uint
 
 	if (id < *count)
 		return;
-	new_configs = kmem_alloc((id + 1) * sizeof(nvlist_t *),
-	    KM_SLEEP | KM_ZERO);
+	new_configs = kmem_zalloc((id + 1) * sizeof(nvlist_t *),
+	    KM_SLEEP);
 	for (i = 0; i < *count; i++)
 		new_configs[i] = (*configs)[i];
 	if (*configs != NULL)



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