Re: [PATCH] xfs: replace kvmalloc_array with kvzalloc_objs
From: Christoph Hellwig
Date: Fri Sep 18 2026 - 07:22:21 EST
On Fri, Sep 18, 2026 at 07:16:32AM +0200, Carlos Maiolino wrote:
> On Thu, Sep 17, 2026 at 08:08:35PM +0000, Lalit Shankar Chowdhury wrote:
> > Replace kvmalloc_array() with the more concise kvzalloc_objs()
> > implementation.
> >
> > Signed-off-by: Lalit Shankar Chowdhury <lalitshankarch@xxxxxxxxx>
>
> NAK...
>
> This is used to allocate composite objects managed through a
> slab cache. This is not for fundamental basic data types....
I don't think so. While the naming of the helper is a bit
unfortunate, it is intended for allocating arrays.
But this function really should not exist, instead bitmap_alloc/free
should be switched to th kvmalloc family so that it will just work
for large allocations and we can kill the wrappers in XFS.