[PATCH 1/6] mm/page_alloc: Remove zone parameter from free_one_page()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Both callers pass in page_zone(page), so move that into free_one_page().
Shrinks page_alloc.o by 196 bytes with allmodconfig.

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

diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index 29d775b60cf9..68bb77900f67 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -1529,11 +1529,10 @@ static void free_pcppages_bulk(struct zone *zone, int count,
 	spin_unlock(&zone->lock);
 }
 
-static void free_one_page(struct zone *zone,
-				struct page *page, unsigned long pfn,
-				unsigned int order,
-				int migratetype, fpi_t fpi_flags)
+static void free_one_page(struct page *page, unsigned long pfn,
+		unsigned int order, int migratetype, fpi_t fpi_flags)
 {
+	struct zone *zone = page_zone(page);
 	unsigned long flags;
 
 	spin_lock_irqsave(&zone->lock, flags);
@@ -3448,7 +3447,7 @@ void free_unref_page(struct page *page, unsigned int order)
 	migratetype = get_pcppage_migratetype(page);
 	if (unlikely(migratetype >= MIGRATE_PCPTYPES)) {
 		if (unlikely(is_migrate_isolate(migratetype))) {
-			free_one_page(page_zone(page), page, pfn, order, migratetype, FPI_NONE);
+			free_one_page(page, pfn, order, migratetype, FPI_NONE);
 			return;
 		}
 		migratetype = MIGRATE_MOVABLE;
@@ -3484,7 +3483,7 @@ void free_unref_page_list(struct list_head *list)
 		migratetype = get_pcppage_migratetype(page);
 		if (unlikely(is_migrate_isolate(migratetype))) {
 			list_del(&page->lru);
-			free_one_page(page_zone(page), page, pfn, 0, migratetype, FPI_NONE);
+			free_one_page(page, pfn, 0, migratetype, FPI_NONE);
 			continue;
 		}
 	}
-- 
2.34.1





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux