]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commit
mm: memcg: remove unneeded checks from newpage_charge()
authorJohannes Weiner <jweiner@redhat.com>
Fri, 13 Jan 2012 01:18:43 +0000 (17:18 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 13 Jan 2012 04:13:06 +0000 (20:13 -0800)
commit7a0524cfc8f9f585471a31b1282a9ce4a1a7d444
tree4e31e1ec7e892d67e48d1199b9e8590ad5718e7a
parent00c54c0bac24bb02d2460c516da76651a7451286
mm: memcg: remove unneeded checks from newpage_charge()

All callsites pass in freshly allocated pages and a valid mm.  As a
result, all checks pertaining to the page's mapcount, page->mapping or the
fallback to init_mm are unneeded.

Signed-off-by: Johannes Weiner <jweiner@redhat.com>
Acked-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Michal Hocko <mhocko@suse.cz>
Cc: David Rientjes <rientjes@google.com>
Cc: Balbir Singh <bsingharora@gmail.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memcontrol.c