diff options
author | Mel Gorman <mel@csn.ul.ie> | 2010-08-09 20:19:29 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-08-09 23:45:00 -0400 |
commit | d4debc66d1fc1b98a68081c4c8156f171841dca8 (patch) | |
tree | 35bc1d2212e3c70ded11d31d28698fee0beeb3b2 /mm/vmscan.c | |
parent | e247dbce5cc747a714e8dcbd6b3f442cc2a284cf (diff) |
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 <mel@csn.ul.ie>
Reviewed-by: Rik van Riel <riel@redhat.com>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Chris Mason <chris.mason@oracle.com>
Cc: Nick Piggin <npiggin@suse.de>
Cc: Rik van Riel <riel@redhat.com>
Cc: Johannes Weiner <hannes@cmpxchg.org>
Cc: Christoph Hellwig <hch@infradead.org>
Cc: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Cc: KOSAKI Motohiro <kosaki.motohiro@jp.fujitsu.com>
Cc: Andrea Arcangeli <aarcange@redhat.com>
Cc: Michael Rubin <mrubin@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/vmscan.c')
-rw-r--r-- | mm/vmscan.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/mm/vmscan.c b/mm/vmscan.c index 8522327bd04f..7f25f336551a 100644 --- a/mm/vmscan.c +++ b/mm/vmscan.c | |||
@@ -1728,13 +1728,12 @@ static void shrink_zone(int priority, struct zone *zone, | |||
1728 | static bool shrink_zones(int priority, struct zonelist *zonelist, | 1728 | static bool shrink_zones(int priority, struct zonelist *zonelist, |
1729 | struct scan_control *sc) | 1729 | struct scan_control *sc) |
1730 | { | 1730 | { |
1731 | enum zone_type high_zoneidx = gfp_zone(sc->gfp_mask); | ||
1732 | struct zoneref *z; | 1731 | struct zoneref *z; |
1733 | struct zone *zone; | 1732 | struct zone *zone; |
1734 | bool all_unreclaimable = true; | 1733 | bool all_unreclaimable = true; |
1735 | 1734 | ||
1736 | for_each_zone_zonelist_nodemask(zone, z, zonelist, high_zoneidx, | 1735 | for_each_zone_zonelist_nodemask(zone, z, zonelist, |
1737 | sc->nodemask) { | 1736 | gfp_zone(sc->gfp_mask), sc->nodemask) { |
1738 | if (!populated_zone(zone)) | 1737 | if (!populated_zone(zone)) |
1739 | continue; | 1738 | continue; |
1740 | /* | 1739 | /* |
@@ -1779,7 +1778,6 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist, | |||
1779 | struct reclaim_state *reclaim_state = current->reclaim_state; | 1778 | struct reclaim_state *reclaim_state = current->reclaim_state; |
1780 | struct zoneref *z; | 1779 | struct zoneref *z; |
1781 | struct zone *zone; | 1780 | struct zone *zone; |
1782 | enum zone_type high_zoneidx = gfp_zone(sc->gfp_mask); | ||
1783 | unsigned long writeback_threshold; | 1781 | unsigned long writeback_threshold; |
1784 | 1782 | ||
1785 | get_mems_allowed(); | 1783 | get_mems_allowed(); |
@@ -1799,7 +1797,8 @@ static unsigned long do_try_to_free_pages(struct zonelist *zonelist, | |||
1799 | */ | 1797 | */ |
1800 | if (scanning_global_lru(sc)) { | 1798 | if (scanning_global_lru(sc)) { |
1801 | unsigned long lru_pages = 0; | 1799 | unsigned long lru_pages = 0; |
1802 | for_each_zone_zonelist(zone, z, zonelist, high_zoneidx) { | 1800 | for_each_zone_zonelist(zone, z, zonelist, |
1801 | gfp_zone(sc->gfp_mask)) { | ||
1803 | if (!cpuset_zone_allowed_hardwall(zone, GFP_KERNEL)) | 1802 | if (!cpuset_zone_allowed_hardwall(zone, GFP_KERNEL)) |
1804 | continue; | 1803 | continue; |
1805 | 1804 | ||