mirror of
https://github.com/torvalds/linux
synced 2024-09-06 09:51:23 +00:00
mm: vmpressure: use mem_cgroup_is_root API
Use mem_cgroup_is_root() API to check if memcg is root memcg instead of open coding. Signed-off-by: Yang Shi <yang.shi@linux.alibaba.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Reviewed-by: David Hildenbrand <david@redhat.com> Acked-by: Michal Hocko <mhocko@suse.com> Acked-by: David Rientjes <rientjes@google.com> Link: http://lkml.kernel.org/r/1581398649-125989-2-git-send-email-yang.shi@linux.alibaba.com Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
565dc84231
commit
d8a1c03ff7
|
@ -280,7 +280,7 @@ void vmpressure(gfp_t gfp, struct mem_cgroup *memcg, bool tree,
|
|||
enum vmpressure_levels level;
|
||||
|
||||
/* For now, no users for root-level efficiency */
|
||||
if (!memcg || memcg == root_mem_cgroup)
|
||||
if (!memcg || mem_cgroup_is_root(memcg))
|
||||
return;
|
||||
|
||||
spin_lock(&vmpr->sr_lock);
|
||||
|
|
Loading…
Reference in a new issue