@@ -77,7 +77,6 @@ unsigned long huge_zero_pfn __read_mostly = ~0UL;
unsigned long huge_anon_orders_always __read_mostly;
unsigned long huge_anon_orders_madvise __read_mostly;
unsigned long huge_anon_orders_inherit __read_mostly;
-static DEFINE_SPINLOCK(huge_anon_orders_lock);
unsigned long __thp_vma_allowable_orders(struct vm_area_struct *vma,
unsigned long vm_flags, bool smaps,
@@ -442,6 +441,7 @@ static const struct attribute_group hugepage_attr_group = {
static void hugepage_exit_sysfs(struct kobject *hugepage_kobj);
static void thpsize_release(struct kobject *kobj);
+static DEFINE_SPINLOCK(huge_anon_orders_lock);
static LIST_HEAD(thpsize_list);
struct thpsize {
huge_anon_orders_lock is used only to serialize sysfs writers. So move its definition so that it is within the CONFIG_SYSFS ifdefery to suppress "defined but not used" warning when sysfs is disabled. Fixes: fe2c9313a8c0 ("mm: thp: Introduce multi-size THP sysfs interface") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202312111916.YbsHxKPq-lkp@intel.com/ Signed-off-by: Ryan Roberts <ryan.roberts@arm.com> --- Hi Andrew, David mentioned that your preference is to squash minor fixes into patches in mm-unstable? Could you please squash this into commit fe2c9313a8c0 ("mm: thp: Introduce multi-size THP sysfs interface")? Thanks, Ryan mm/huge_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.25.1