On Fri, May 17, 2019 at 11:16:52AM +0300, Nikolay Borisov wrote: > xfs_efd_log is really a struct which ends with an array. I think it will > make it slightly more obvious if you use the newly introduced > struct_size like so: > > kmem_zalloc(struct_size(efdp, efd_format.efd_extents, nextents -1), > KM_SLEEP) If we do that we should also kill the fake first entry in the array and make it a C99 flexible array. But that should be done in a separate patch.