__kasan_unpoison_pages(page, order, init);
 }
 
-void __kasan_cache_create(struct kmem_cache *cache, unsigned int *size,
-                               slab_flags_t *flags);
-static __always_inline void kasan_cache_create(struct kmem_cache *cache,
-                               unsigned int *size, slab_flags_t *flags)
-{
-       if (kasan_enabled())
-               __kasan_cache_create(cache, size, flags);
-}
-
 void __kasan_cache_create_kmalloc(struct kmem_cache *cache);
 static __always_inline void kasan_cache_create_kmalloc(struct kmem_cache *cache)
 {
                                      bool init) {}
 static inline void kasan_unpoison_pages(struct page *page, unsigned int order,
                                        bool init) {}
-static inline void kasan_cache_create(struct kmem_cache *cache,
-                                     unsigned int *size,
-                                     slab_flags_t *flags) {}
 static inline void kasan_cache_create_kmalloc(struct kmem_cache *cache) {}
 static inline void kasan_poison_slab(struct slab *slab) {}
 static inline void kasan_unpoison_object_data(struct kmem_cache *cache,
 
 size_t kasan_metadata_size(struct kmem_cache *cache);
 slab_flags_t kasan_never_merge(void);
+void kasan_cache_create(struct kmem_cache *cache, unsigned int *size,
+                       slab_flags_t *flags);
 
 void kasan_cache_shrink(struct kmem_cache *cache);
 void kasan_cache_shutdown(struct kmem_cache *cache);
 {
        return 0;
 }
+/* And no cache-related metadata initialization is required. */
+static inline void kasan_cache_create(struct kmem_cache *cache,
+                                     unsigned int *size,
+                                     slab_flags_t *flags) {}
 
 static inline void kasan_cache_shrink(struct kmem_cache *cache) {}
 static inline void kasan_cache_shutdown(struct kmem_cache *cache) {}
 
                             KASAN_PAGE_FREE, init);
 }
 
-void __kasan_cache_create(struct kmem_cache *cache, unsigned int *size,
-                         slab_flags_t *flags)
-{
-       /*
-        * SLAB_KASAN is used to mark caches as ones that are sanitized by
-        * KASAN. Currently this flag is used in two places:
-        * 1. In slab_ksize() when calculating the size of the accessible
-        *    memory within the object.
-        * 2. In slab_common.c to prevent merging of sanitized caches.
-        */
-       *flags |= SLAB_KASAN;
-
-       if (kasan_requires_meta())
-               kasan_init_cache_meta(cache, size);
-}
-
 void __kasan_cache_create_kmalloc(struct kmem_cache *cache)
 {
        cache->kasan_info.is_kmalloc = true;
 
                object_size <= (1 << 16) - 1024 ? 1024 : 2048;
 }
 
-void kasan_init_cache_meta(struct kmem_cache *cache, unsigned int *size)
+void kasan_cache_create(struct kmem_cache *cache, unsigned int *size,
+                         slab_flags_t *flags)
 {
        unsigned int ok_size;
        unsigned int optimal_size;
 
+       if (!kasan_requires_meta())
+               return;
+
+       /*
+        * SLAB_KASAN is used to mark caches that are sanitized by KASAN
+        * and that thus have per-object metadata.
+        * Currently this flag is used in two places:
+        * 1. In slab_ksize() to account for per-object metadata when
+        *    calculating the size of the accessible memory within the object.
+        * 2. In slab_common.c via kasan_never_merge() to prevent merging of
+        *    caches with per-object metadata.
+        */
+       *flags |= SLAB_KASAN;
+
        ok_size = *size;
 
        /* Add alloc meta into redzone. */