The patch titled memcg: fix build warning and avoid checking for mem != null again and again has been added to the -mm tree. Its filename is memcg-fix-build-warning-and-avoid-checking-for-mem-=-null-again-and-again.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** See http://userweb.kernel.org/~akpm/stuff/added-to-mm.txt to find out what to do about this The current -mm tree may be found at http://userweb.kernel.org/~akpm/mmotm/ ------------------------------------------------------ Subject: memcg: fix build warning and avoid checking for mem != null again and again From: Nikanth Karthikesan <knikanth@xxxxxxx> 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@xxxxxxx> Acked-by: Pekka Enberg <penberg@xxxxxxxxxxxxxx> Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@xxxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- mm/memcontrol.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff -puN mm/memcontrol.c~memcg-fix-build-warning-and-avoid-checking-for-mem-=-null-again-and-again mm/memcontrol.c --- a/mm/memcontrol.c~memcg-fix-build-warning-and-avoid-checking-for-mem-=-null-again-and-again +++ a/mm/memcontrol.c @@ -314,14 +314,6 @@ static struct mem_cgroup *try_get_mem_cg 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(struc if (unlikely(!mem)) return 0; - VM_BUG_ON(!mem || mem_cgroup_is_obsolete(mem)); + VM_BUG_ON(css_is_removed(&mem->css)); while (1) { int ret; _ Patches currently in -mm which might be from knikanth@xxxxxxx are memcg-fix-build-warning-and-avoid-checking-for-mem-=-null-again-and-again.patch linux-next.patch block-prevent-possible-io_context-refcount-overflow.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html