diff options
author | Mel Gorman <mgorman@techsingularity.net> | 2016-05-19 20:14:24 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2016-05-19 22:12:14 -0400 |
commit | e5b31ac2ca2cd0cf6bf2fcbb708ed01466c89aaa (patch) | |
tree | e2cad286d5b732013c774e203f2d92c1763f22b4 /mm/page_alloc.c | |
parent | da838d4fcba675cbf864f225d76f970e91220ee6 (diff) |
mm, page_alloc: remove unnecessary variable from free_pcppages_bulk
The original count is never reused so it can be removed.
Signed-off-by: Mel Gorman <mgorman@techsingularity.net>
Acked-by: Vlastimil Babka <vbabka@suse.cz>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/page_alloc.c')
-rw-r--r-- | mm/page_alloc.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c index fea50b0cb405..822ce86fc883 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c | |||
@@ -857,7 +857,6 @@ static void free_pcppages_bulk(struct zone *zone, int count, | |||
857 | { | 857 | { |
858 | int migratetype = 0; | 858 | int migratetype = 0; |
859 | int batch_free = 0; | 859 | int batch_free = 0; |
860 | int to_free = count; | ||
861 | unsigned long nr_scanned; | 860 | unsigned long nr_scanned; |
862 | bool isolated_pageblocks; | 861 | bool isolated_pageblocks; |
863 | 862 | ||
@@ -867,7 +866,7 @@ static void free_pcppages_bulk(struct zone *zone, int count, | |||
867 | if (nr_scanned) | 866 | if (nr_scanned) |
868 | __mod_zone_page_state(zone, NR_PAGES_SCANNED, -nr_scanned); | 867 | __mod_zone_page_state(zone, NR_PAGES_SCANNED, -nr_scanned); |
869 | 868 | ||
870 | while (to_free) { | 869 | while (count) { |
871 | struct page *page; | 870 | struct page *page; |
872 | struct list_head *list; | 871 | struct list_head *list; |
873 | 872 | ||
@@ -887,7 +886,7 @@ static void free_pcppages_bulk(struct zone *zone, int count, | |||
887 | 886 | ||
888 | /* This is the only non-empty list. Free them all. */ | 887 | /* This is the only non-empty list. Free them all. */ |
889 | if (batch_free == MIGRATE_PCPTYPES) | 888 | if (batch_free == MIGRATE_PCPTYPES) |
890 | batch_free = to_free; | 889 | batch_free = count; |
891 | 890 | ||
892 | do { | 891 | do { |
893 | int mt; /* migratetype of the to-be-freed page */ | 892 | int mt; /* migratetype of the to-be-freed page */ |
@@ -905,7 +904,7 @@ static void free_pcppages_bulk(struct zone *zone, int count, | |||
905 | 904 | ||
906 | __free_one_page(page, page_to_pfn(page), zone, 0, mt); | 905 | __free_one_page(page, page_to_pfn(page), zone, 0, mt); |
907 | trace_mm_page_pcpu_drain(page, 0, mt); | 906 | trace_mm_page_pcpu_drain(page, 0, mt); |
908 | } while (--to_free && --batch_free && !list_empty(list)); | 907 | } while (--count && --batch_free && !list_empty(list)); |
909 | } | 908 | } |
910 | spin_unlock(&zone->lock); | 909 | spin_unlock(&zone->lock); |
911 | } | 910 | } |