Re: [PATCH] fs: hide file and bfile caches behind runtime const machinery
From: Al Viro
Date: Mon Apr 06 2026 - 17:13:14 EST
On Sat, Mar 28, 2026 at 06:37:28PM +0100, Mateusz Guzik wrote:
> -static struct kmem_cache *filp_cachep __ro_after_init;
> -static struct kmem_cache *bfilp_cachep __ro_after_init;
> +static struct kmem_cache *__filp_cache __ro_after_init;
> +#define filp_cache runtime_const_ptr(__filp_cache)
> +static struct kmem_cache *__bfilp_cache __ro_after_init;
> +#define bfilp_cache runtime_const_ptr(__bfilp_cache)
IMO the entire runtime_const_ptr thing for caches is wrong;
statically allocated kmem_cache series got stalled, but I'm
bringing it back next cycle and this stuff is going to get
reverted as part of that.