diff options
author | mm <mm@FreeBSD.org> | 2012-02-03 13:40:51 +0000 |
---|---|---|
committer | mm <mm@FreeBSD.org> | 2012-02-03 13:40:51 +0000 |
commit | 421efb0b3f246807fa90f1268fdf459a7c454f7f (patch) | |
tree | 333a7a0c100af03bf7f8ee813ccd819a10764c6e /sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c | |
parent | d275eb87ace1f23c7813b08c8a75f8ff041840f0 (diff) | |
download | FreeBSD-src-421efb0b3f246807fa90f1268fdf459a7c454f7f.zip FreeBSD-src-421efb0b3f246807fa90f1268fdf459a7c454f7f.tar.gz |
Revert r230913 and r230914.
The initialization was correct, the problem needs deeper analysis.
Diffstat (limited to 'sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c')
-rw-r--r-- | sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c index 554da17..ca2b69a 100644 --- a/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c +++ b/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dnode.c @@ -20,9 +20,6 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. - * - * Portions Copyright 2012 Sergey Kandaurov <pluknet@FreeBSD.org> - * Portions Copyright 2012 Martin Matuska <mm@FreeBSD.org> */ #include <sys/zfs_context.h> @@ -996,7 +993,7 @@ dnode_buf_pageout(dmu_buf_t *db, void *arg) 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 object, int flag, 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 object, int flag, 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; } } |