Commit 58824c83 authored by Lu Jialin's avatar Lu Jialin Committed by Zheng Zengkai
Browse files

cgroup: fix compile error when CONFIG_MEMCG = n

hulk inclusion
category: bugfix
bugzilla: https://gitee.com/openeuler/kernel/issues/I4IMAK?from=project-issue


CVE: NA

--------

when CONFIG_MEMCG = n, compile error occurs

mm/vmscan.c: In function ‘is_memcg_kswapd_stopped’:
mm/vmscan.c:2849:11: error: dereferencing pointer to incomplete type ‘struct mem_cgroup’
  if (memcg->memory.max == PAGE_COUNTER_MAX)

Fix the error by modify is_memcg_kswapd_stopped function return false when
CONFIG_MEMCG = n

v2: add compile error message in commit msg

Signed-off-by: default avatarLu Jialin <lujialin4@huawei.com>
Reviewed-by: default avatarweiyang wang <wangweiyang2@huawei.com>
Signed-off-by: default avatarZheng Zengkai <zhengzengkai@huawei.com>
parent b297b0eb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment