Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp677188pxk; Sun, 30 Aug 2020 19:25:51 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzLwEz7ozXWTPzlKOuTjdTGuhO8isTlySa32KO7JaAxsti3K9mmjXopiEhVd4VX9eppBRvH X-Received: by 2002:a17:906:2704:: with SMTP id z4mr9723635ejc.350.1598840751110; Sun, 30 Aug 2020 19:25:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598840751; cv=none; d=google.com; s=arc-20160816; b=t+J4fK4SzeOAq9CwncD5bkFgZNMyePRUw2VuhgvOiMt+aLQTfyS4rt9CRkRSn17X4P D3CKSYhkCQhT0Ctkw7oGxtWF7eoEzyB1N5fxU4c5gXrM0d7IceFCfW+eeXNzO7LKbKz4 SE0SqgIkNJGKeIencsnX6VM1sYsGBknbRhOPtl1H7MBTWWAqlnufQ2dmxwKfmxHH1hd2 Jwpa9fVkGSE+y7ng+LBfzRo1S7Yeqk3GDRi9M21DwIfQ0TjBXdxc7Mmsani8/v8Bczqx 0rjGcin9lUaJ2fPEBntpKkg+JR45TWDMldNmyKElGnUvjSyW/yR3pGF9x3FY39vnupbu dvtA== 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=heLU0UpM3eZhRefVx+H30Gskn4dpTR6whda8IqZCd7pm5yeOA3UuIvDZ3re2A1a5TV /fTe4Q4dXFPTJqGutgspuhy8JaDjhtWfgoW73v2gqbdc64qE6q8QIXyzEEoGeFlVo8a4 1TrdUXyyOyT9NgGCq3J5bG/x8Znb3Tlq4MUU+dfdb4Pg1L9fMQV7vEzTWgPUCM8wYNE2 tBGNfnd4+NWqhWa7ugbtSsSqXtssddCYDNJma5C/FinJJLSqatoTiqnZFHj3NP7Whddy AoKEyrsPWS83MP4g+WfMhavvN3Hf5qj+vAvIqudxSkVFbLpXAgJXCpbMuTWet+CpkXke j1MQ== 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 z2si4816416eju.389.2020.08.30.19.25.28; Sun, 30 Aug 2020 19:25: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 S1727845AbgHaCYb (ORCPT + 99 others); Sun, 30 Aug 2020 22:24:31 -0400 Received: from out30-54.freemail.mail.aliyun.com ([115.124.30.54]:42008 "EHLO out30-54.freemail.mail.aliyun.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726573AbgHaCYC (ORCPT ); Sun, 30 Aug 2020 22:24:02 -0400 X-Alimail-AntiSpam: AC=PASS;BC=-1|-1;BR=01201311R521e4;CH=green;DM=||false|;DS=||;FP=0|-1|-1|-1|0|-1|-1|-1;HT=e01f04455;MF=richard.weiyang@linux.alibaba.com;NM=1;PH=DS;RN=6;SR=0;TI=SMTPD_---0U7IVpwB_1598840640; Received: from localhost(mailfrom:richard.weiyang@linux.alibaba.com fp:SMTPD_---0U7IVpwB_1598840640) by smtp.aliyun-inc.com(127.0.0.1); Mon, 31 Aug 2020 10:24:00 +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 v3 5/7] mm/hugetlb: a page from buddy is not on any list Date: Mon, 31 Aug 2020 10:23:49 +0800 Message-Id: <20200831022351.20916-6-richard.weiyang@linux.alibaba.com> X-Mailer: git-send-email 2.20.1 (Apple Git-117) In-Reply-To: <20200831022351.20916-1-richard.weiyang@linux.alibaba.com> References: <20200831022351.20916-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)