summaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorYafang Shao <laoar.shao@gmail.com>2019-05-13 17:22:40 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2019-05-14 09:47:50 -0700
commit1c52e6d0681020e2272c0cbce270dd91a215e7d3 (patch)
tree25f48b30d5f43f0248c87bf027853d5fbdfb4761 /mm
parent2c8fc3dcf2dc5cc06c30b63deada4237cd5bf8af (diff)
downloadlinux-1c52e6d0681020e2272c0cbce270dd91a215e7d3.tar.gz
linux-1c52e6d0681020e2272c0cbce270dd91a215e7d3.tar.bz2
linux-1c52e6d0681020e2272c0cbce270dd91a215e7d3.zip
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.com Signed-off-by: Yafang Shao <laoar.shao@gmail.com> Acked-by: Michal Hocko <mhocko@suse.com> Acked-by: Pankaj Gupta <pagupta@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm')
-rw-r--r--mm/page_alloc.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index c45da9fe3ce1..cbda9aea0bf5 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3170,9 +3170,8 @@ static struct page *__rmqueue_pcplist(struct zone *zone, int migratetype,
/* Lock and remove page from the per-cpu list */
static struct page *rmqueue_pcplist(struct zone *preferred_zone,
- struct zone *zone, unsigned int order,
- gfp_t gfp_flags, int migratetype,
- unsigned int alloc_flags)
+ struct zone *zone, gfp_t gfp_flags,
+ int migratetype, unsigned int alloc_flags)
{
struct per_cpu_pages *pcp;
struct list_head *list;
@@ -3184,7 +3183,7 @@ static struct page *rmqueue_pcplist(struct zone *preferred_zone,
list = &pcp->lists[migratetype];
page = __rmqueue_pcplist(zone, migratetype, alloc_flags, pcp, list);
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);
}
local_irq_restore(flags);
@@ -3204,8 +3203,8 @@ struct page *rmqueue(struct zone *preferred_zone,
struct page *page;
if (likely(order == 0)) {
- page = rmqueue_pcplist(preferred_zone, zone, order,
- gfp_flags, migratetype, alloc_flags);
+ page = rmqueue_pcplist(preferred_zone, zone, gfp_flags,
+ migratetype, alloc_flags);
goto out;
}