From d4debc66d1fc1b98a68081c4c8156f171841dca8 Mon Sep 17 00:00:00 2001 From: Mel Gorman Date: Mon, 9 Aug 2010 17:19:29 -0700 Subject: [PATCH] vmscan: remove unnecessary temporary vars in do_try_to_free_pages Remove temporary variable that is only used once and does not help clarify code. [akpm@linux-foundation.org: coding-style fixes] Signed-off-by: Mel Gorman Reviewed-by: Rik van Riel Cc: Dave Chinner Cc: Chris Mason Cc: Nick Piggin Cc: Rik van Riel Cc: Johannes Weiner Cc: Christoph Hellwig Cc: KAMEZAWA Hiroyuki Cc: KOSAKI Motohiro Cc: Andrea Arcangeli Cc: Michael Rubin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- mm/vmscan.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/mm/vmscan.c b/mm/vmscan.c index 8522327bd04f4e..7f25f336551a8d 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c @@ -1728,13 +1728,12 @@ static void shrink_zone(int priority, struct zone *zone, static bool shrink_zones(int priority, struct zonelist *zonelist, struct scan_control *sc) { - enum zone_type high_zoneidx = gfp_zone(sc->gfp_mask); struct zoneref *z; struct zone *zone; bool all_unreclaimable = true; - for_each_zone_zonelist_nodemask(zone, z, zonelist, high_zoneidx, - sc->nodemask) { + for_each_zone_zonelist_nodemask(zone, z, zonelist, + gfp_zone(sc->gfp_mask), sc->nodemask) { if (!populated_zone(zone)) continue; /* @@ -1779,7 +1778,6 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist, struct reclaim_state *reclaim_state = current->reclaim_state; struct zoneref *z; struct zone *zone; - enum zone_type high_zoneidx = gfp_zone(sc->gfp_mask); unsigned long writeback_threshold; get_mems_allowed(); @@ -1799,7 +1797,8 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist, */ if (scanning_global_lru(sc)) { unsigned long lru_pages = 0; - for_each_zone_zonelist(zone, z, zonelist, high_zoneidx) { + for_each_zone_zonelist(zone, z, zonelist, + gfp_zone(sc->gfp_mask)) { if (!cpuset_zone_allowed_hardwall(zone, GFP_KERNEL)) continue;