]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
dcache: use kmalloc_flex() in __d_alloc
authorThorsten Blum <thorsten.blum@linux.dev>
Fri, 17 Apr 2026 09:42:40 +0000 (11:42 +0200)
committerChristian Brauner <brauner@kernel.org>
Thu, 21 May 2026 07:32:47 +0000 (09:32 +0200)
commit0447533faeeefc02c2979abf46c4dcbbbe6d9871
treeabce5c751606722e5c2da3a38d5a4eee062432de
parent80008c75f4523076a0ada0ac883ad8890b830ec9
dcache: use kmalloc_flex() in __d_alloc

Use kmalloc_flex() when allocating a new 'struct external_name' in
__d_alloc() to replace offsetof() and the open-coded size arithmetic,
and to keep the size type-safe.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
Link: https://patch.msgid.link/20260417094238.551114-3-thorsten.blum@linux.dev
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Jori Koolstra <jkoolstra@xs4all.nl>
Signed-off-by: Christian Brauner <brauner@kernel.org>
fs/dcache.c