author: Miaohe Lin <linmiaohe@huawei.com> 2021-09-08 18:10:11 -0700
committer: Linus Torvalds <torvalds@linux-foundation.org> 2021-09-08 18:45:53 -0700
commit: 053cfda102306a3394012f9fe2594811c34925e4
parent: 32d4f4b782bb8f0ceb78c6b5dc46eb577ae25bf7
Commit Summary:
Diffstat:
1 file changed, 3 insertions, 1 deletion
diff --git a/mm/page_alloc.c b/mm/page_alloc.c
index de309a1dfe65..b37435c274cf 100644
--- a/mm/page_alloc.c
+++ b/mm/page_alloc.c
@@ -3428,8 +3428,10 @@ void free_unref_page_list(struct list_head *list)
/* Prepare pages for freeing */
list_for_each_entry_safe(page, next, list, lru) {
pfn = page_to_pfn(page);
- if (!free_unref_page_prepare(page, pfn, 0))
+ if (!free_unref_page_prepare(page, pfn, 0)) {
list_del(&page->lru);
+ continue;
+ }
/*
* Free isolated pages directly to the allocator, see