Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1388304pxk; Mon, 31 Aug 2020 18:47:49 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyKJnAvpqg7/jpzMchQfKc54STgq+fz8fPfNjjdJv8twP3Xow0uu/dmVmVZY3X2Dzs4imRr X-Received: by 2002:a17:906:364b:: with SMTP id r11mr1311494ejb.48.1598924869543; Mon, 31 Aug 2020 18:47:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598924869; cv=none; d=google.com; s=arc-20160816; b=FjAq6zY871rOzG8rZnvUt5SFq/hbZG2ldtQi4TU4ReExBnyTji9+jowNClwvyWFYzy pwGWUWQERqSI70Zv12C5vIaFq6L4iDMzz7l3bERc86tABiW2wfRDw40bxnleHW/DIi7/ kha6hMPD7CZfbxjgqXKhjATDePW2QY5WigDIqQlY2US8+UY/cMT3Dr0Th30O9MkAB/uH 3rbUdrKcrU3Tj+A684N5H9w7UDDAph5tmXpmAgOfnMrFb6jwR8V55oaAGjFE44+I57Ix ku8O9pUDBp1WlhdFGEEbcTJRrzWGarIEbtQP2xojhXMOiQCen1jeOwnyPLMqVzwkJmhR 5qjQ== 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=jp5FZmP8FcNvF3ej7wFeRdgf7jyxtsJjdORaTRdSUMw=; b=fmlQFuWBX2uCd3qnhnQ21glhsnQzau6ClNiwwbSDTui2hEl4ESRtYSwjLQm2tOOfK6 vRrQ+Ad68ZVwl/GnbYBzq58P0mOF5vzNRvN5nLQbkBCN03N84ZLzNRnbNtwahT3kOvGE NQSMYiGm89MrNBBcaJcfb5JX/RBHSfqut/M9jWm0JEUcivC0qnApdUHR1GJW1ugBvdCN HQNaOvEV8O89/nt+VsqtpjW0YCLrttEJFbx4CiyEpngCT/A00mmwzMRqkX3I5eo1WgOa NT5adDEJY7syCEaXhAkOhphUuOgB0VqqUnF76u1XMG3VJPVud2DgnYuN4Jcz4TV+8mav gG8A== 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 d24si5746880edv.518.2020.08.31.18.47.25; Mon, 31 Aug 2020 18:47:49 -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 S1726490AbgIABqu (ORCPT + 99 others); Mon, 31 Aug 2020 21:46:50 -0400 Received: from out30-43.freemail.mail.aliyun.com ([115.124.30.43]:39787 "EHLO out30-43.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726249AbgIABqs (ORCPT ); Mon, 31 Aug 2020 21:46:48 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R131e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01e01419;MF=richard.weiyang@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0U7UMeD4_1598924804; Received: from localhost(mailfrom:richard.weiyang@linux.alibaba.com fp:SMTPD_---0U7UMeD4_1598924804) by smtp.aliyun-inc.com(127.0.0.1); Tue, 01 Sep 2020 09:46:45 +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 v4 5/7] mm/hugetlb: a page from buddy is not on any list Date: Tue, 1 Sep 2020 09:46:34 +0800 Message-Id: <20200901014636.29737-6-richard.weiyang@linux.alibaba.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20200901014636.29737-1-richard.weiyang@linux.alibaba.com> References: <20200901014636.29737-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 441b7f7c623e..c9b292e664c4 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -2405,7 +2405,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)