svn commit: r230945 - head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs

Martin Matuska mm at FreeBSD.org
Fri Feb 3 13:40:52 UTC 2012


Author: mm
Date: Fri Feb  3 13:40:51 2012
New Revision: 230945
URL: http://svn.freebsd.org/changeset/base/230945

Log:
  Revert r230913 and r230914.
  
  The initialization was correct, the problem needs deeper analysis.

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

Modified: head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c
==============================================================================
--- head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c	Fri Feb  3 13:20:48 2012	(r230944)
+++ head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c	Fri Feb  3 13:40:51 2012	(r230945)
@@ -20,9 +20,6 @@
  */
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- *
- * Portions Copyright 2012 Sergey Kandaurov <pluknet at FreeBSD.org>
- * Portions Copyright 2012 Martin Matuska <mm at FreeBSD.org>
  */
 
 #include <sys/zfs_context.h>
@@ -996,7 +993,7 @@ dnode_buf_pageout(dmu_buf_t *db, void *a
 		dnh->dnh_dnode = NULL;
 	}
 	kmem_free(children_dnodes, sizeof (dnode_children_t) +
-	    epb * sizeof (dnode_handle_t));
+	    (epb - 1) * sizeof (dnode_handle_t));
 }
 
 /*
@@ -1081,7 +1078,7 @@ dnode_hold_impl(objset_t *os, uint64_t o
 		int i;
 		dnode_children_t *winner;
 		children_dnodes = kmem_zalloc(sizeof (dnode_children_t) +
-		    epb * sizeof (dnode_handle_t), KM_SLEEP);
+		    (epb - 1) * sizeof (dnode_handle_t), KM_SLEEP);
 		children_dnodes->dnc_count = epb;
 		dnh = &children_dnodes->dnc_children[0];
 		for (i = 0; i < epb; i++) {
@@ -1091,7 +1088,7 @@ dnode_hold_impl(objset_t *os, uint64_t o
 		if (winner = dmu_buf_set_user(&db->db, children_dnodes, NULL,
 		    dnode_buf_pageout)) {
 			kmem_free(children_dnodes, sizeof (dnode_children_t) +
-			    epb * sizeof (dnode_handle_t));
+			    (epb - 1) * sizeof (dnode_handle_t));
 			children_dnodes = winner;
 		}
 	}


More information about the svn-src-head mailing list