mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
UPSTREAM: BACKPORT: mm/page_alloc: don't pass pfn to free_unref_page_commit()
free_unref_page_commit() doesn't make use of its pfn argument, so get
rid of it.
Link: https://lkml.kernel.org/r/20220202140451.415928-1-nsaenzju@redhat.com
Signed-off-by: Nicolas Saenz Julienne <nsaenzju@redhat.com>
Reviewed-by: Vlastimil Babka <vbabka@suse.cz>
Reviewed-by: Matthew Wilcox (Oracle) <willy@infradead.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
(cherry picked from commit 566513775d)
Bug: 230899966
Signed-off-by: Minchan Kim <minchan@google.com>
Change-Id: Ica1c200408ff1f91589cb2ed28c4fac0ce0c62f8
This commit is contained in:
committed by
Minchan Kim
parent
5707719280
commit
e70a2e110b
@@ -3342,8 +3342,7 @@ static bool free_unref_page_prepare(struct page *page, unsigned long pfn)
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void free_unref_page_commit(struct page *page, unsigned long pfn,
|
static void free_unref_page_commit(struct page *page, int migratetype)
|
||||||
int migratetype)
|
|
||||||
{
|
{
|
||||||
struct zone *zone = page_zone(page);
|
struct zone *zone = page_zone(page);
|
||||||
struct per_cpu_pages *pcp;
|
struct per_cpu_pages *pcp;
|
||||||
@@ -3388,7 +3387,7 @@ void free_unref_page(struct page *page)
|
|||||||
}
|
}
|
||||||
|
|
||||||
local_irq_save(flags);
|
local_irq_save(flags);
|
||||||
free_unref_page_commit(page, pfn, migratetype);
|
free_unref_page_commit(page, migratetype);
|
||||||
local_irq_restore(flags);
|
local_irq_restore(flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -3398,13 +3397,13 @@ void free_unref_page(struct page *page)
|
|||||||
void free_unref_page_list(struct list_head *list)
|
void free_unref_page_list(struct list_head *list)
|
||||||
{
|
{
|
||||||
struct page *page, *next;
|
struct page *page, *next;
|
||||||
unsigned long flags, pfn;
|
unsigned long flags;
|
||||||
int batch_count = 0;
|
int batch_count = 0;
|
||||||
int migratetype;
|
int migratetype;
|
||||||
|
|
||||||
/* Prepare pages for freeing */
|
/* Prepare pages for freeing */
|
||||||
list_for_each_entry_safe(page, next, list, lru) {
|
list_for_each_entry_safe(page, next, list, lru) {
|
||||||
pfn = page_to_pfn(page);
|
unsigned long pfn = page_to_pfn(page);
|
||||||
if (!free_unref_page_prepare(page, pfn))
|
if (!free_unref_page_prepare(page, pfn))
|
||||||
list_del(&page->lru);
|
list_del(&page->lru);
|
||||||
|
|
||||||
@@ -3428,17 +3427,13 @@ void free_unref_page_list(struct list_head *list)
|
|||||||
if (migratetype == MIGRATE_HIGHATOMIC)
|
if (migratetype == MIGRATE_HIGHATOMIC)
|
||||||
set_pcppage_migratetype(page, MIGRATE_MOVABLE);
|
set_pcppage_migratetype(page, MIGRATE_MOVABLE);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_page_private(page, pfn);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
local_irq_save(flags);
|
local_irq_save(flags);
|
||||||
list_for_each_entry_safe(page, next, list, lru) {
|
list_for_each_entry_safe(page, next, list, lru) {
|
||||||
pfn = page_private(page);
|
|
||||||
set_page_private(page, 0);
|
|
||||||
migratetype = get_pcppage_migratetype(page);
|
migratetype = get_pcppage_migratetype(page);
|
||||||
trace_mm_page_free_batched(page);
|
trace_mm_page_free_batched(page);
|
||||||
free_unref_page_commit(page, pfn, migratetype);
|
free_unref_page_commit(page, migratetype);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Guard against excessive IRQ disabled times when we get
|
* Guard against excessive IRQ disabled times when we get
|
||||||
|
|||||||
Reference in New Issue
Block a user