[Devel] [PATCH RHEL10 COMMIT] mm/memcontrol: add missing inline to the mem_cgroup_fill_meminfo() stub

Konstantin Khorenko khorenko at virtuozzo.com
Fri Aug 21 19:42:19 MSK 2026


The commit is pushed to "branch-rh10-6.12.0-211.39.1.16.x.vz10-ovz" and will appear at git at bitbucket.org:openvz/vzkernel.git
after rh10-6.12.0-211.39.1.16.6.vz10
------>
commit e976003eb47715a1d96e05c4cb66aba9449b7157
Author: Eva Kurchatova <eva.kurchatova at virtuozzo.com>
Date:   Fri Aug 21 18:37:03 2026 +0200

    mm/memcontrol: add missing inline to the mem_cgroup_fill_meminfo() stub
    
    The !CONFIG_MEMCG stub of mem_cgroup_fill_meminfo() is declared "static
    void", not "static inline void", so every translation unit that includes
    memcontrol.h without calling it gets an unused function - an error rather
    than a warning once CONFIG_WERROR=y, as x86_64 defconfig has it:
    
      include/linux/memcontrol.h: error: 'mem_cgroup_fill_meminfo' defined
                                  but not used [-Werror=unused-function]
    
    Add the missing inline, like every other stub in the same #else block.
    
    Fixes: 7710faa9d4f0 ("ve/proc: virtualize /proc/meminfo in a Container")
    Feature: procfs: virtualize /proc/meminfo
    https://virtuozzo.atlassian.net/browse/VSTOR-134732
    Signed-off-by: Eva Kurchatova <eva.kurchatova at virtuozzo.com>
    
    Signed-off-by: Konstantin Khorenko <khorenko at virtuozzo.com>
---
 include/linux/memcontrol.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/include/linux/memcontrol.h b/include/linux/memcontrol.h
index d47c3de71a491..2772a7750fa4e 100644
--- a/include/linux/memcontrol.h
+++ b/include/linux/memcontrol.h
@@ -1559,7 +1559,8 @@ static inline void split_page_memcg(struct page *head, int old_order, int new_or
 {
 }
 
-static void mem_cgroup_fill_meminfo(struct mem_cgroup *memcg, struct meminfo *mi)
+static inline void mem_cgroup_fill_meminfo(struct mem_cgroup *memcg,
+					   struct meminfo *mi)
 {
 }
 


More information about the Devel mailing list