Date: Sat, 2 Aug 2014 06:49:16 +0000 (UTC) From: Xin LI <delphij@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-vendor@freebsd.org Subject: svn commit: r269427 - in vendor-sys/illumos/dist/uts/common/fs/zfs: . sys Message-ID: <201408020649.s726nG9n082131@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: delphij Date: Sat Aug 2 06:49:16 2014 New Revision: 269427 URL: http://svnweb.freebsd.org/changeset/base/269427 Log: Author: Justin T. Gibbs <justing@spectralogic.com> Date: Fri Aug 1 17:55:38 2014 -0800 5038 Remove "old-style" flexible array usage in ZFS. Reviewed by: Matthew Ahrens <mahrens@delphix.com> Reviewed by: Josef 'Jeff' Sipek <jeffpc@josefsipek.net> Approved by: Richard Lowe <richlowe@richlowe.net> illumos/illumos-gate@7f18da4c54210b682e105b0e7be5195c60f98d20 Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c Sat Aug 2 06:33:58 2014 (r269426) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/dnode.c Sat Aug 2 06:49:16 2014 (r269427) @@ -1021,7 +1021,7 @@ dnode_buf_pageout(dmu_buf_t *db, void *a dnh->dnh_dnode = NULL; } kmem_free(children_dnodes, sizeof (dnode_children_t) + - (epb - 1) * sizeof (dnode_handle_t)); + epb * sizeof (dnode_handle_t)); } /* @@ -1106,7 +1106,7 @@ dnode_hold_impl(objset_t *os, uint64_t o 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++) { @@ -1121,7 +1121,7 @@ dnode_hold_impl(objset_t *os, uint64_t o } kmem_free(children_dnodes, sizeof (dnode_children_t) + - (epb - 1) * sizeof (dnode_handle_t)); + epb * sizeof (dnode_handle_t)); children_dnodes = winner; } } Modified: vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h ============================================================================== --- vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h Sat Aug 2 06:33:58 2014 (r269426) +++ vendor-sys/illumos/dist/uts/common/fs/zfs/sys/dnode.h Sat Aug 2 06:49:16 2014 (r269427) @@ -245,7 +245,7 @@ typedef struct dnode_handle { typedef struct dnode_children { size_t dnc_count; /* number of children */ - dnode_handle_t dnc_children[1]; /* sized dynamically */ + dnode_handle_t dnc_children[]; /* sized dynamically */ } dnode_children_t; typedef struct free_range {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201408020649.s726nG9n082131>