--- zzzz-none-000/linux-4.4.271/include/linux/slub_def.h 2021-06-03 06:22:09.000000000 +0000 +++ hawkeye-5590-750/linux-4.4.271/include/linux/slub_def.h 2023-04-19 10:22:30.000000000 +0000 @@ -56,6 +56,10 @@ unsigned long x; }; +#if defined(CONFIG_SYSFS) && !defined(CONFIG_AVM_THIN_SYSFS) +#define SLAB_SUPPORTS_SYSFS +#endif + /* * Slab cache management. */ @@ -82,13 +86,13 @@ int reserved; /* Reserved bytes at the end of slabs */ const char *name; /* Name (only for display!) */ struct list_head list; /* List of slab caches */ -#ifdef CONFIG_SYSFS +#ifdef SLAB_SUPPORTS_SYSFS struct kobject kobj; /* For sysfs */ #endif #ifdef CONFIG_MEMCG_KMEM struct memcg_cache_params memcg_params; int max_attr_size; /* for propagation, maximum size of a stored attr */ -#ifdef CONFIG_SYSFS +#ifdef SLAB_SUPPORTS_SYSFS struct kset *memcg_kset; #endif #endif @@ -102,8 +106,7 @@ struct kmem_cache_node *node[MAX_NUMNODES]; }; -#ifdef CONFIG_SYSFS -#define SLAB_SUPPORTS_SYSFS +#if defined(SLAB_SUPPORTS_SYSFS) void sysfs_slab_remove(struct kmem_cache *); #else static inline void sysfs_slab_remove(struct kmem_cache *s)