summaryrefslogtreecommitdiffstats
path: root/module/zfs/dnode.c
diff options
context:
space:
mode:
authorJustin T. Gibbs <[email protected]>2015-04-02 02:09:20 +1100
committerBrian Behlendorf <[email protected]>2015-04-28 16:24:24 -0700
commit5aea3644d6aef3fe636053d6924bc0803fbd75b5 (patch)
treee19e3f8d0168d87614f5c0d22d61b2e5216cbd9f /module/zfs/dnode.c
parent8951cb8dfb8dcf410a237656c1f9c9767e4a9e6c (diff)
Illumos 5038 - Remove "old-style" flexible array usage in ZFS.
5038 Remove "old-style" flexible array usage in ZFS. Author: Justin T. Gibbs <[email protected]> Reviewed by: Matthew Ahrens <[email protected]> Reviewed by: Josef 'Jeff' Sipek <[email protected]> Approved by: Richard Lowe <[email protected]> References: https://www.illumos.org/issues/5038 https://github.com/illumos/illumos-gate/commit/7f18da4 Ported-by: Chris Dunlop <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]>
Diffstat (limited to 'module/zfs/dnode.c')
-rw-r--r--module/zfs/dnode.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/module/zfs/dnode.c b/module/zfs/dnode.c
index 41722f25c..7c28dc64d 100644
--- a/module/zfs/dnode.c
+++ b/module/zfs/dnode.c
@@ -1022,7 +1022,7 @@ dnode_buf_pageout(dmu_buf_t *db, void *arg)
dnh->dnh_dnode = NULL;
}
kmem_free(children_dnodes, sizeof (dnode_children_t) +
- (epb - 1) * sizeof (dnode_handle_t));
+ epb * sizeof (dnode_handle_t));
}
/*
@@ -1107,7 +1107,7 @@ dnode_hold_impl(objset_t *os, uint64_t object, int flag,
int i;
dnode_children_t *winner;
children_dnodes = kmem_alloc(sizeof (dnode_children_t) +
- (epb - 1) * sizeof (dnode_handle_t), KM_SLEEP);
+ epb * sizeof (dnode_handle_t), KM_SLEEP);
children_dnodes->dnc_count = epb;
dnh = &children_dnodes->dnc_children[0];
for (i = 0; i < epb; i++) {
@@ -1122,7 +1122,7 @@ dnode_hold_impl(objset_t *os, uint64_t object, int flag,
}
kmem_free(children_dnodes, sizeof (dnode_children_t) +
- (epb - 1) * sizeof (dnode_handle_t));
+ epb * sizeof (dnode_handle_t));
children_dnodes = winner;
}
}