Commit 1c52e6d0 authored by Yafang Shao's avatar Yafang Shao Committed by Linus Torvalds

mm/page_alloc.c: remove unnecessary parameter in rmqueue_pcplist

Because rmqueue_pcplist() is only called when order is 0, we don't need to
use order as a parameter.

Link: http://lkml.kernel.org/r/1555591709-11744-1-git-send-email-laoar.shao@gmail.comSigned-off-by: default avatarYafang Shao <laoar.shao@gmail.com>
Acked-by: default avatarMichal Hocko <mhocko@suse.com>
Acked-by: default avatarPankaj Gupta <pagupta@redhat.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent 2c8fc3dc
...@@ -3170,9 +3170,8 @@ static struct page *__rmqueue_pcplist(struct zone *zone, int migratetype, ...@@ -3170,9 +3170,8 @@ static struct page *__rmqueue_pcplist(struct zone *zone, int migratetype,
/* Lock and remove page from the per-cpu list */ /* Lock and remove page from the per-cpu list */
static struct page *rmqueue_pcplist(struct zone *preferred_zone, static struct page *rmqueue_pcplist(struct zone *preferred_zone,
struct zone *zone, unsigned int order, struct zone *zone, gfp_t gfp_flags,
gfp_t gfp_flags, int migratetype, int migratetype, unsigned int alloc_flags)
unsigned int alloc_flags)
{ {
struct per_cpu_pages *pcp; struct per_cpu_pages *pcp;
struct list_head *list; struct list_head *list;
...@@ -3184,7 +3183,7 @@ static struct page *rmqueue_pcplist(struct zone *preferred_zone, ...@@ -3184,7 +3183,7 @@ static struct page *rmqueue_pcplist(struct zone *preferred_zone,
list = &pcp->lists[migratetype]; list = &pcp->lists[migratetype];
page = __rmqueue_pcplist(zone, migratetype, alloc_flags, pcp, list); page = __rmqueue_pcplist(zone, migratetype, alloc_flags, pcp, list);
if (page) { if (page) {
__count_zid_vm_events(PGALLOC, page_zonenum(page), 1 << order); __count_zid_vm_events(PGALLOC, page_zonenum(page), 1);
zone_statistics(preferred_zone, zone); zone_statistics(preferred_zone, zone);
} }
local_irq_restore(flags); local_irq_restore(flags);
...@@ -3204,8 +3203,8 @@ struct page *rmqueue(struct zone *preferred_zone, ...@@ -3204,8 +3203,8 @@ struct page *rmqueue(struct zone *preferred_zone,
struct page *page; struct page *page;
if (likely(order == 0)) { if (likely(order == 0)) {
page = rmqueue_pcplist(preferred_zone, zone, order, page = rmqueue_pcplist(preferred_zone, zone, gfp_flags,
gfp_flags, migratetype, alloc_flags); migratetype, alloc_flags);
goto out; goto out;
} }
......
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