Messages in this thread Patch in this message | | | From | Nikanth Karthikesan <> | Subject | [PATCH] Fix build warning and avoid checking for mem != null twice | Date | Tue, 26 May 2009 18:44:32 +0530 |
| |
Fix build warning, "mem_cgroup_is_obsolete defined but not used" when CONFIG_DEBUG_VM is not set. Also avoid checking for !mem twice.
Signed-off-by: Nikanth Karthikesan <knikanth@suse.de>
--- diff --git a/mm/memcontrol.c b/mm/memcontrol.c index 01c2d8f..420fc61 100644 --- a/mm/memcontrol.c +++ b/mm/memcontrol.c @@ -314,14 +314,6 @@ static struct mem_cgroup *try_get_mem_cgroup_from_mm(struct mm_struct *mm) 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. */ @@ -932,7 +924,7 @@ static int __mem_cgroup_try_charge(struct mm_struct *mm, if (unlikely(!mem)) return 0; - VM_BUG_ON(!mem || mem_cgroup_is_obsolete(mem)); + VM_BUG_ON(!mem || css_is_removed(&mem->css)); while (1) { int ret;
| |