Commit e5b31ac2 authored by Mel Gorman's avatar Mel Gorman Committed by Linus Torvalds

mm, page_alloc: remove unnecessary variable from free_pcppages_bulk

The original count is never reused so it can be removed.
Signed-off-by: default avatarMel Gorman <mgorman@techsingularity.net>
Acked-by: default avatarVlastimil Babka <vbabka@suse.cz>
Cc: Jesper Dangaard Brouer <brouer@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent da838d4f
...@@ -857,7 +857,6 @@ static void free_pcppages_bulk(struct zone *zone, int count, ...@@ -857,7 +857,6 @@ static void free_pcppages_bulk(struct zone *zone, int count,
{ {
int migratetype = 0; int migratetype = 0;
int batch_free = 0; int batch_free = 0;
int to_free = count;
unsigned long nr_scanned; unsigned long nr_scanned;
bool isolated_pageblocks; bool isolated_pageblocks;
...@@ -867,7 +866,7 @@ static void free_pcppages_bulk(struct zone *zone, int count, ...@@ -867,7 +866,7 @@ static void free_pcppages_bulk(struct zone *zone, int count,
if (nr_scanned) if (nr_scanned)
__mod_zone_page_state(zone, NR_PAGES_SCANNED, -nr_scanned); __mod_zone_page_state(zone, NR_PAGES_SCANNED, -nr_scanned);
while (to_free) { while (count) {
struct page *page; struct page *page;
struct list_head *list; struct list_head *list;
...@@ -887,7 +886,7 @@ static void free_pcppages_bulk(struct zone *zone, int count, ...@@ -887,7 +886,7 @@ static void free_pcppages_bulk(struct zone *zone, int count,
/* This is the only non-empty list. Free them all. */ /* This is the only non-empty list. Free them all. */
if (batch_free == MIGRATE_PCPTYPES) if (batch_free == MIGRATE_PCPTYPES)
batch_free = to_free; batch_free = count;
do { do {
int mt; /* migratetype of the to-be-freed page */ int mt; /* migratetype of the to-be-freed page */
...@@ -905,7 +904,7 @@ static void free_pcppages_bulk(struct zone *zone, int count, ...@@ -905,7 +904,7 @@ static void free_pcppages_bulk(struct zone *zone, int count,
__free_one_page(page, page_to_pfn(page), zone, 0, mt); __free_one_page(page, page_to_pfn(page), zone, 0, mt);
trace_mm_page_pcpu_drain(page, 0, mt); trace_mm_page_pcpu_drain(page, 0, mt);
} while (--to_free && --batch_free && !list_empty(list)); } while (--count && --batch_free && !list_empty(list));
} }
spin_unlock(&zone->lock); spin_unlock(&zone->lock);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment