mirror of
https://github.com/adulau/aha.git
synced 2024-12-28 03:36:19 +00:00
memcg: fix build warning and avoid checking for mem != null again and again
Fix build warning, "mem_cgroup_is_obsolete defined but not used" when CONFIG_DEBUG_VM is not set. Also avoid checking for !mem again and again. Signed-off-by: Nikanth Karthikesan <knikanth@suse.de> Acked-by: Pekka Enberg <penberg@cs.helsinki.fi> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
parent
f83a275dbc
commit
46f7e602fb
1 changed files with 1 additions and 9 deletions
|
@ -314,14 +314,6 @@ static struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm)
|
||||||
return mem;
|
return mem;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool mem_cgroup_is_obsolete(struct mem_cgroup *mem)
|
|
||||||
{
|
|
||||||
if (!mem)
|
|
||||||
return true;
|
|
||||||
return css_is_removed(&mem->css);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Call callback function against all cgroup under hierarchy tree.
|
* Call callback function against all cgroup under hierarchy tree.
|
||||||
*/
|
*/
|
||||||
|
@ -932,7 +924,7 @@ static int __mem_cgroup_try_charge(struct mm_struct *mm,
|
||||||
if (unlikely(!mem))
|
if (unlikely(!mem))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
VM_BUG_ON(!mem || mem_cgroup_is_obsolete(mem));
|
VM_BUG_ON(css_is_removed(&mem->css));
|
||||||
|
|
||||||
while (1) {
|
while (1) {
|
||||||
int ret;
|
int ret;
|
||||||
|
|
Loading…
Reference in a new issue