[PATCH 06/11] mm: Pass order to rmqueue in GFP flags

Matthew Wilcox
2019-05-07T04:06:23Z

Matches the change to the __alloc_pages_nodemask API.

Signed-off-by: Matthew Wilcox (Oracle) <willy@infradead.org>
---
mm/page_alloc.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 987d47c9bb37..4705d0e7cf6f 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3171,11 +3171,10 @@ static struct page *rmqueue_pcplist(struct zone *preferred_zone,
* Allocate a page from the given zone. Use pcplists for order-0 allocations.
*/
static inline
-struct page *rmqueue(struct zone *preferred_zone,
- struct zone *zone, unsigned int order,
- gfp_t gfp_flags, unsigned int alloc_flags,
- int migratetype)
+struct page *rmqueue(struct zone *preferred_zone, struct zone *zone,
+ gfp_t gfp_flags, unsigned int alloc_flags, int migratetype)
{
+ unsigned int order = gfp_order(gfp_flags);
unsigned long flags;
struct page *page;

@@ -3595,7 +3594,7 @@ get_page_from_freelist(gfp_t gfp_mask, unsigned int order, int alloc_flags,
}

try_this_zone:
- page = rmqueue(ac->preferred_zoneref->zone, zone, order,
+ page = rmqueue(ac->preferred_zoneref->zone, zone,
gfp_mask, alloc_flags, ac->migratetype);
if (page) {
prep_new_page(page, gfp_mask, alloc_flags);
--
2.20.1