]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: memcg: remove unneeded checks from newpage_charge()
authorJohannes Weiner <jweiner@redhat.com>
Fri, 2 Dec 2011 03:13:07 +0000 (14:13 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 7 Dec 2011 05:33:10 +0000 (16:33 +1100)
commit27f42bdfabd12b7de07f7af807882891b3dc7798
tree6fd4587fcbad530988ae4d987cfe30b85a5df316
parent77050b4a53d2428cb99a8917069d92c7caa3c6b4
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>
mm/memcontrol.c