From: Michal Hocko Date: Wed, 12 Dec 2012 21:52:23 +0000 (-0800) Subject: memcg: do not check for mm in __mem_cgroup_count_vm_event X-Git-Tag: omap-for-v3.8/fixes-for-merge-window-v4-signed~33^2~7 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c95d26c2ffd3931123d6a7a2489530ccbd36da7a;p=pandora-kernel.git memcg: do not check for mm in __mem_cgroup_count_vm_event The mm given to __mem_cgroup_count_vm_event() cannot be NULL because the function is either called from the page fault path or vma->vm_mm is used. So the check can be dropped. The check was introduced by commit 456f998ec817 ("memcg: add the pagefault count into memcg stats") because the originally proposed patch used current->mm for shmem but this has been changed to vma->vm_mm later on without the check being removed (thanks to Hugh for this recollection). Signed-off-by: Michal Hocko Cc: Hugh Dickins Cc: Ying Han Cc: David Rientjes Cc: Johannes Weiner Cc: KAMEZAWA Hiroyuki Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed