From patchwork Wed Jun 21 08:14:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolin Wang X-Patchwork-Id: 13286833 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9564DEB64D7 for ; Wed, 21 Jun 2023 08:14:49 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 04DC68D0002; Wed, 21 Jun 2023 04:14:49 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id F3F868D0001; Wed, 21 Jun 2023 04:14:48 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id E2ED98D0002; Wed, 21 Jun 2023 04:14:48 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id CEE768D0001 for ; Wed, 21 Jun 2023 04:14:48 -0400 (EDT) Received: from smtpin02.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id A4404A081B for ; Wed, 21 Jun 2023 08:14:48 +0000 (UTC) X-FDA: 80926043856.02.16A89AE Received: from out30-130.freemail.mail.aliyun.com (out30-130.freemail.mail.aliyun.com [115.124.30.130]) by imf09.hostedemail.com (Postfix) with ESMTP id 4F676140019 for ; Wed, 21 Jun 2023 08:14:44 +0000 (UTC) Authentication-Results: imf09.hostedemail.com; dkim=none; spf=pass (imf09.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.130 as permitted sender) smtp.mailfrom=baolin.wang@linux.alibaba.com; dmarc=pass (policy=none) header.from=alibaba.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1687335286; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=6FNQKzD3rtVHmJSjqEt+dVSG6EuHoCWxkOrOZ0oIQw4=; b=0rZWkRSL288lijuXKTtxmnDqTkUVV5hxREZzqXjVw9P9sd5fgNndhXpT/8fdWW+XkcN+6H LHn/PkRfW1xSP0Jzgym8V2dIWYNEgiovIGDAXzL5hjkEHj75VIbM06IRBx84xVs4Ejgw62 iMgGDt5RqnEiai8FSr4wY3oTf4XjGas= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1687335286; a=rsa-sha256; cv=none; b=n91fZB3QUNNTkFfVb21F51B+Rlg6r/uzqZTEHOWnJchQAcqyCXX8lGz0yXcjGUFH3A96L8 vecc7Y4osJZpWssIB/5lTB0CWdg45T2EYcItvNr5SBP6Cs2O8j9lF6t6Tg/BczfcK0Kwj5 ECh4JYw+4ViYoQMvPq1OJtvmP8jD5b8= ARC-Authentication-Results: i=1; imf09.hostedemail.com; dkim=none; spf=pass (imf09.hostedemail.com: domain of baolin.wang@linux.alibaba.com designates 115.124.30.130 as permitted sender) smtp.mailfrom=baolin.wang@linux.alibaba.com; dmarc=pass (policy=none) header.from=alibaba.com X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R141e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=ay29a033018045192;MF=baolin.wang@linux.alibaba.com;NM=1;PH=DS;RN=5;SR=0;TI=SMTPD_---0VlfF3q2_1687335280; Received: from localhost(mailfrom:baolin.wang@linux.alibaba.com fp:SMTPD_---0VlfF3q2_1687335280) by smtp.aliyun-inc.com; Wed, 21 Jun 2023 16:14:41 +0800 From: Baolin Wang To: akpm@linux-foundation.org Cc: mgorman@techsingularity.net, baolin.wang@linux.alibaba.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org Subject: [PATCH] mm: page_alloc: use the correct type of list for free pages Date: Wed, 21 Jun 2023 16:14:28 +0800 Message-Id: <7e7ab533247d40c0ea0373c18a6a48e5667f9e10.1687333557.git.baolin.wang@linux.alibaba.com> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Rspamd-Queue-Id: 4F676140019 X-Rspam-User: X-Stat-Signature: 7k1cgkmqt6x64ofiw3ngsryqqnu4nr95 X-Rspamd-Server: rspam03 X-HE-Tag: 1687335284-355606 X-HE-Meta: U2FsdGVkX1+csHcvP0NLMcS553oFbDCnPrijwK5JGo1lPtbkK7wN0mpKaEt1BZQ/JAYA0LmpC47E9Cmnx2PbOjXzSjQzm2szRuLFpn4MVcLaWlzqJTf1QM4N/IG9rKtvlab5N1tkVIwZPFbL/BGyW/vzgpaG6hx3BGdWVG/9KjjPaPzsneMxI87qgYHsj7cM/5W2vZ1b8/6m3jVJy6cu2L1aYP/QXMqRWvuPEaBBXjy8i9w+duMMggGxjkij2NDe1Q21VAmKibydFVpmjbYwwVM8RCpVWiasSBrowTEkw1ImtHj4BGAezQvOPyKmyOGNQbjX4yR6u6uLU4mMrqxlWy/Tp7EYvdgwY6jvr35kUVvPBgPjo0N9aCmWMiGVHJYkEzbry/lm3HTOHBVDP8HhLPheaU52bGNoUDY5XglIjvyTJBq7ZK5ssXGUpuJ7xLHSU2oxuzwNOFtgoMwSNuN/4du/jwgftKx9YjLBMiz4MqaftfTT+G5QU53l/+CrVaNLcR1GuBdsbrEVWp8ZX7EihHyzxsRuSvRqiEoTys5WRhj8d0oGLoy65+VcOX5412ZPjv6lQ7ZOvuB90qn5xBpX0MZ51QBwwGXrmOYGt8iOxB5YUH0g4Lnwkol1poYkhX9n1Rh7sv7gqjsehgVYIYJF/7aO2bMXpyt3bQwIQCoAxJ1peRTr9STuv28GeS0gnk4W2Dfep4RUMidMh2ffQCAYMjdPwROLqwPu9j2wfkkanN+kc42ZExOswMqtHlP7uHog4Ef3QEpQKijiUIGw8D3qsH0YPsU6x63tqPOhwbL6tyJgzlfOxWW5gbA99abhpHZYlIoqMtRWS7fmndooQC0L0HJFkLRrVJsQZ4xhcMxru+9w1+EKO3EVq9qfBZKe4MHwXDeq7B/y4GXSwq9DL//mz1YJEYRr67FgVjxRKSBVjYApd0ccY4LLPAG16hI3KuYSA57sIr0+MYEhv1AFhiB zIIbh5ic sFworRV6hl6KYlOPw8zjzLZLzQux0sXkQy58P5u6t88a8hBv/cOm/pobrj6NQe2biQjmVUkWdEy2e5j+eo4aG9knse2rj4gO1tRKCiNScW9VP7cyBVZlOndfGilNN1QAV5qe+eMjMw46hxh+HL9M60cpmwWDK+AGPoa5oMRV+LFEUdhc= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: Commit bf75f200569d ("mm/page_alloc: add page->buddy_list and page->pcp_list") introduces page->buddy_list and page->pcp_list as a union with page->lru, but missed to change get_page_from_free_area() to use page->buddy_list to clarify the correct type of list for a free page. Signed-off-by: Baolin Wang Acked-by: Mel Gorman Reviewed-by: David Hildenbrand --- mm/page_alloc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/page_alloc.c b/mm/page_alloc.c index 5c691426822a..c1839a53326c 100644 --- a/mm/page_alloc.c +++ b/mm/page_alloc.c @@ -727,7 +727,7 @@ static inline struct page *get_page_from_free_area(struct free_area *area, int migratetype) { return list_first_entry_or_null(&area->free_list[migratetype], - struct page, lru); + struct page, buddy_list); } /*