Re: [PATCH] btrfs: Simplify the allocation of slab caches in btrfs_delayed_inode_init

From: David Sterba
Date: Wed Jan 31 2024 - 13:40:07 EST


On Wed, Jan 31, 2024 at 10:20:35AM +0000, Johannes Thumshirn wrote:
> On 31.01.24 07:20, Kunwu Chan wrote:
> > commit 0a31bd5f2bbb ("KMEM_CACHE(): simplify slab cache creation")
> > introduces a new macro.
> > Use the new KMEM_CACHE() macro instead of direct kmem_cache_create
>
> That commit is 17 years old. Why should we switch to it _now_? I
> wouldn't call it a new macro.

I had the same reaction after checking the commit that added it.
>
> Don't get me wrong, I don't oppose the patch, but I'd prefer a better
> explanation why now and not 17 years ago when the macro got introduced.

We can add the macros where possible, at least it hides all the 0 or
NULL parameters, but yeah with a better changelog.