]> git.karo-electronics.de Git - karo-tx-linux.git/commit
mm: memcg: remove unneeded checks from newpage_charge()
authorJohannes Weiner <jweiner@redhat.com>
Fri, 16 Dec 2011 04:50:37 +0000 (15:50 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Wed, 21 Dec 2011 06:01:58 +0000 (17:01 +1100)
commit824105562e316b565ddac056e65d008c0134ad42
tree3ab711461d1a2c7984b381d2834d6f4c5a4ea3fd
parent22f8b1ea019e031402f96680224b707a9e8753fc
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