From: Vlastimil Babka Date: Thu, 9 Oct 2014 22:26:51 +0000 (-0700) Subject: mm: page_alloc: determine migratetype only once X-Git-Tag: fixes-against-v3.18-rc2~137^2~98 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=21bb9bd19430a43e6462ce75030fd7fac4b766ef;p=pandora-kernel.git mm: page_alloc: determine migratetype only once The check for ALLOC_CMA in __alloc_pages_nodemask() derives migratetype from gfp_mask in each retry pass, although the migratetype variable already has the value determined and it does not change. Use the variable and perform the check only once. Also convert #ifdef CONFIG_CMA to IS_ENABLED. Signed-off-by: Vlastimil Babka Acked-by: David Rientjes Cc: Mel Gorman Cc: Rik van Riel Cc: Johannes Weiner Cc: "Srivatsa S. Bhat" Cc: Hugh Dickins Cc: Minchan Kim Cc: Joonsoo Kim Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed