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: 110858 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp4205102vqr; Wed, 21 Jun 2023 01:22:36 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6heWbjy0KT6vrziJQDbwIqgMnlFqGc3DXAY/jU3xE99kd3eIdw/ubQM3A2On+iWKi9/w2v X-Received: by 2002:a05:6a00:23c1:b0:668:9bf9:fa8d with SMTP id g1-20020a056a0023c100b006689bf9fa8dmr5033323pfc.16.1687335756426; Wed, 21 Jun 2023 01:22:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1687335756; cv=none; d=google.com; s=arc-20160816; b=Vl/9IeZ523uzNUQ9t+qDnGDIcdZyBmJFx2JXfxNURs+JsAwus7RYvGluZnuT760sxI gTuz6WxPKvzJ7vBS++kkEUoGvOtHpwgTZiRfymAPBu7F7yK8zQI7j6TlAOFSJon4JCIl jvZ2wdLGjZTReGQLI2R5B4kWSh7J443pRPSgSI4mCiCwRz4fStOpFX7+VB7yVU+Ba1Y/ ITJbQvW+4Hcg+lHRjg36aW1XkE5nlZ6A0bzrndqpJBSklEuaiARZGL4PWJpdKNO6ZXoH +RXViSF+oQnwwygNR14jpjIYiN7aJFmogPlbBCABwbnjNuffxKE6j0v2BD5Q5g5wZJDx rE5Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=6FNQKzD3rtVHmJSjqEt+dVSG6EuHoCWxkOrOZ0oIQw4=; b=VvNWYlQ4G+EOUS8Fgb4Wlv7Qs0lDiF099bot14DJvXONs6fyPpmCgA7yZ+xwRVgCBH BSgi91McgGTs3lpwaRLbdPXtQFI2ri8LF9Vh1+n/OC81n6ixFd7HirRaFzgCRlUKoUK2 BJHiKXdFZnxzTlABiK4dbSb19KD2x6OBmxRudnEfqNp4Yp1wrFJzEFbsmURkHMmt6FyB 6U6KG8BMhVuMtMU3xcgaTrm3vnC+ym3Vwhs9ElkqwEHeQhJ+Jdh9dDyxBQ6x4Xix29do ZhEElK5mJ7VOvQB5bIpb9aZsAp8KLEx+WSplwBj90kSMGLJpasc4NLZKduWZ1s0NfzT6 fjqA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id az9-20020a056a02004900b00553c2f85088si3550173pgb.888.2023.06.21.01.22.21; Wed, 21 Jun 2023 01:22:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230253AbjFUIPS (ORCPT + 99 others); Wed, 21 Jun 2023 04:15:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230259AbjFUIOq (ORCPT ); Wed, 21 Jun 2023 04:14:46 -0400 Received: from out30-99.freemail.mail.aliyun.com (out30-99.freemail.mail.aliyun.com [115.124.30.99]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3634CCC for ; Wed, 21 Jun 2023 01:14:44 -0700 (PDT) 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-Spam-Status: No, score=-9.9 required=5.0 tests=BAYES_00, ENV_AND_HDR_SPF_MATCH,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY,USER_IN_DEF_SPF_WL autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1769299778393630859?= X-GMAIL-MSGID: =?utf-8?q?1769299778393630859?= 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); } /*