Received: by 2002:a05:6a10:6006:0:0:0:0 with SMTP id w6csp907020pxa; Thu, 27 Aug 2020 20:33:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxNUvDcI03QDzArEGsF+x/GNj+wFfwCiiMbRbEcCRX5gpNnLWYFkBuIDLpSRV3MHpSoyZq8 X-Received: by 2002:a17:906:9356:: with SMTP id p22mr23626536ejw.119.1598585631763; Thu, 27 Aug 2020 20:33:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598585631; cv=none; d=google.com; s=arc-20160816; b=eiabdcTsVufQOLNnppAzybcyv5L5qY7Uqu2WOc93g11mxQkhvylkxWDxAZtWrq+uiD tCt4GHXw94X/JHWceNpAUeRCxH+cCNjf4TtKVlaE7c5bvsF4otukBny+DA672NWUh96Y 2yx3IBnoJRXIeP/O2p4t7qtRWgnz8zyQZXg/bEE+Ahm/rr7A1nlXLcqb4W3n8vaa2KOI VL/kapw/qXGdmYC6ILes3EvUQxDpUkZY3dvOoe6cPEeQ1uAsbc1s0STmjpf0GFjIWZDl migeSQOIVEBV7UXryCA6wcAGtPkT+XbA+ZmRhrQBnIydMjc7Qvb5PFy2Xca4XnF58YFn 8vDA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=WzaveNKrLuNbNLSCod0vykThAEc/dvqJPA7oo1pmM1E=; b=rh7w35bXH8ACwbQTEj/udPIzLlAbScle41rXtFi6m9KnKURYOm5mrsoAzXfuomvQzZ tYTLqrveYPkRVkxfnK6AQyWQV6g6o7QMOTQN116lQWRZNKcnKcHdYXQZgtvArEjHF6hn kvfggi/1LGtNi+r94xYLOnRlf+3x8xHycZtHX7nTh7/m5YtYJNHkkJUOOX+T2FDrOye0 6JKEGjIqEpwRlsmKQ6mnx85hcgSccDz37wum8zmHJIh9cvqxJjpchtEGyxmGe7MVydpm Wrq+lLRvPFS1CNn3UlniRPPiVqHIjxEsQEPGnhylRNNDnC+R3KqNtbqKKzXMeqhNsiQi 6qbg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=alibaba.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id lj10si2653609ejb.702.2020.08.27.20.33.29; Thu, 27 Aug 2020 20:33:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 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 S1728254AbgH1Dc6 (ORCPT + 99 others); Thu, 27 Aug 2020 23:32:58 -0400 Received: from out30-133.freemail.mail.aliyun.com ([115.124.30.133]:60328 "EHLO out30-133.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726803AbgH1Dc4 (ORCPT ); Thu, 27 Aug 2020 23:32:56 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R711e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04427;MF=richard.weiyang@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0U73Y7vy_1598585572; Received: from localhost(mailfrom:richard.weiyang@linux.alibaba.com fp:SMTPD_---0U73Y7vy_1598585572) by smtp.aliyun-inc.com(127.0.0.1); Fri, 28 Aug 2020 11:32:53 +0800 From: Wei Yang To: mike.kravetz@oracle.com, akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, bhe@redhat.com, Wei Yang Subject: [Patch v2 5/7] mm/hugetlb: a page from buddy is not on any list Date: Fri, 28 Aug 2020 11:32:40 +0800 Message-Id: <20200828033242.8787-6-richard.weiyang@linux.alibaba.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20200828033242.8787-1-richard.weiyang@linux.alibaba.com> References: <20200828033242.8787-1-richard.weiyang@linux.alibaba.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The page allocated from buddy is not on any list, so just use list_add() is enough. Signed-off-by: Wei Yang Reviewed-by: Baoquan He Reviewed-by: Mike Kravetz --- mm/hugetlb.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index bbccbfeb8601..5a71cb7acf6b 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2428,7 +2428,7 @@ struct page *alloc_huge_page(struct vm_area_struct *vma, h->resv_huge_pages--; } spin_lock(&hugetlb_lock); - list_move(&page->lru, &h->hugepage_activelist); + list_add(&page->lru, &h->hugepage_activelist); /* Fall through */ } hugetlb_cgroup_commit_charge(idx, pages_per_huge_page(h), h_cg, page); -- 2.20.1 (Apple Git-117)