[PATCH slab/for-next v2 12/14] hostfs: specify SLAB_MAY_ACCOUNT for inode cache
Hao Li
hao.li at linux.dev
Thu Dec 3 15:02:02 UTC 2026
On Wed, Nov 25, 2026 at 09:37:13PM +0000, Harry Yoo (Meta) wrote:
> hostfs inodes are allocated with GFP_KERNEL_ACCOUNT. Specify
> SLAB_MAY_ACCOUNT when the object may be charged to a memcg.
> __GFP_ACCOUNT without SLAB_MAY_ACCOUNT will not be allowed.
>
> Path: lookup -> hostfs_iget() -> hostfs_alloc_inode()
> -> alloc_inode_sb(sb, hostfs_inode_cache, GFP_KERNEL_ACCOUNT)
>
> Cc: Richard Weinberger <richard at nod.at>
> Cc: Anton Ivanov <anton.ivanov at cambridgegreys.com>
> Cc: Johannes Berg <johannes at sipsolutions.net>
> Cc: linux-um at lists.infradead.org
> Signed-off-by: Harry Yoo (Meta) <harry at kernel.org>
> ---
> fs/hostfs/hostfs_kern.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
Looks good to me.
Reviewed-by: Hao Li <hao.li at linux.dev>
--
Thanks,
Hao
More information about the Linux-security-module-archive
mailing list