queue-6.12: fix duplicate inline in mm/slab backport
The 6.12 backport of
d9e6a7623938 ("mm/slab: prevent unbounded recursion
in free path with new kmalloc type") adds a stable-only adjustment that
marks need_kmalloc_no_objext() __always_inline, because
mem_alloc_profiling_permanently_disabled() is __init in 6.12. The
adjustment was written as:
static __always_inline inline bool need_kmalloc_no_objext(void)
__always_inline already expands to "inline __attribute__((__always_inline__))"
and inline is itself a macro, so the declaration ends up with two inline
specifiers. clang rejects that with -Wduplicate-decl-specifier, which is
an error with CONFIG_WERROR:
In file included from mm/mempool.c:21:
mm/slab.h:572:24: error: duplicate 'inline' declaration specifier [-Werror,-Wduplicate-decl-specifier]
572 | static __always_inline inline bool need_kmalloc_no_objext(void)
| ^
Reported by KernelCI as a build regression on stable-rc/linux-6.12.y, and
confirmed by Nathan Chancellor, who pointed out the correct fix: drop the
redundant inline and keep __always_inline.
The 6.18 and 7.1 backports of the same commit use plain "static inline"
and are not affected.
Reported-by: KernelCI bot <bot@kernelci.org>
Reported-by: Nathan Chancellor <nathan@kernel.org>
Link: https://lore.kernel.org/stable/20260807180245.GA4067747@ax162/
Signed-off-by: Sasha Levin <sashal@kernel.org>