Skip to content

Commit 9c94bef

Browse files
Xiang Yangakpm00
authored andcommitted
mm/memcontrol.c: replace cgroup_memory_nokmem with mem_cgroup_kmem_disabled()
mem_cgroup_kmem_disabled() checks whether the kmem accounting is off. Therefore, replace cgroup_memory_nokmem with mem_cgroup_kmem_disabled(), which is the same work in percpu.c and slab_common.c. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Xiang Yang <[email protected]> Reviewed-by: Muchun Song <[email protected]> Acked-by: Roman Gushchin <[email protected]> Acked-by: Souptick Joarder (HPE) <[email protected]> Cc: Johannes Weiner <[email protected]> Cc: Michal Hocko <[email protected]> Cc: Shakeel Butt <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 01b4445 commit 9c94bef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mm/memcontrol.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3653,7 +3653,7 @@ static int memcg_online_kmem(struct mem_cgroup *memcg)
36533653
{
36543654
struct obj_cgroup *objcg;
36553655

3656-
if (cgroup_memory_nokmem)
3656+
if (mem_cgroup_kmem_disabled())
36573657
return 0;
36583658

36593659
if (unlikely(mem_cgroup_is_root(memcg)))
@@ -3677,7 +3677,7 @@ static void memcg_offline_kmem(struct mem_cgroup *memcg)
36773677
{
36783678
struct mem_cgroup *parent;
36793679

3680-
if (cgroup_memory_nokmem)
3680+
if (mem_cgroup_kmem_disabled())
36813681
return;
36823682

36833683
if (unlikely(mem_cgroup_is_root(memcg)))

0 commit comments

Comments
 (0)