Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3374103ybc; Thu, 21 Nov 2019 07:25:53 -0800 (PST) X-Google-Smtp-Source: APXvYqx0vrYhnLe3SxuBohRv6pDagrilWWBh4G7HuANbp9m59vSn9xXEX6AvBtpp2tUj5Zkq9+DM X-Received: by 2002:a17:906:d71:: with SMTP id s17mr14492937ejh.312.1574349953780; Thu, 21 Nov 2019 07:25:53 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1574349953; cv=none; d=google.com; s=arc-20160816; b=g8IjQp1FchLATwAqTQ+Wj0QvmvnWXugRyPAfG1CZztLRPJTCr5bKIdkI7Fb7WPeAHn 30jfsvxqIxVASHxidnD6UTm8l7E4aOXEOFXWebI0ou0YggJ9jNd0V4lX6p//9plEDKSW qZpoiITe4lX1ofVWiNMWxrwX2OepsrhTwJlRwGRgVKNSzJMPQ7h3KOZ3BGZjL6xIB+GH Pg8r2iB6v9FIvPQ6lMa0yLLIm+QCQlrb/27yr6kHzYcxUnZeCVVYmBAq9XNAgmoWqfeP +f7hKWa9/ZXIa/cNBUXejVqXU/jM671J2Y/clLvusC2mVfiGSDrlqroQkVBvVtg29wFC mXJg== 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=uSW5yhzUgsSsz2Thwvfqvnhisq5BRM46nK48el51vB4=; b=cji6k/mLYEvtE0/xP+ZgXc+JWlecFktQcFDC09ulJOGBGwJQgieEH6Xa5mbemtXMbW DR1AcxHJ5wyKB+dBj+WMCjbYFtZzFMPcCek9PEIk2/erelKaVRM42AQ5/Sj4I2dd9z/M bJ4jMFVuuId3fQRdm3O66tKC95cM1yPub6xnirzL4z72cmQW1IgtlSTW2VqGHbdDw2wk aFskH14BJCz/8Czv0NbXDtQlB1/HeZOd7ar784ATXLODc5wYhj3IxsAdHoA/H3C0qyop gPV7kgBYVkj+3r23/2xaOhyq80rwxjFWYnCbaT85KKUkfz7ZlWYQonfsUddIb1iTky2k HqWg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id gv22si1930142ejb.2.2019.11.21.07.25.26; Thu, 21 Nov 2019 07:25:53 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727234AbfKUPVf (ORCPT + 99 others); Thu, 21 Nov 2019 10:21:35 -0500 Received: from relay5-d.mail.gandi.net ([217.70.183.197]:35779 "EHLO relay5-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726279AbfKUPVf (ORCPT ); Thu, 21 Nov 2019 10:21:35 -0500 X-Originating-IP: 153.3.140.100 Received: from localhost.localdomain.localdomain (unknown [153.3.140.100]) (Authenticated sender: fly@kernel.page) by relay5-d.mail.gandi.net (Postfix) with ESMTPSA id 5E3151C0003; Thu, 21 Nov 2019 15:21:24 +0000 (UTC) From: Pengfei Li To: akpm@linux-foundation.org Cc: mgorman@techsingularity.net, mhocko@kernel.org, vbabka@suse.cz, cl@linux.com, iamjoonsoo.kim@lge.com, guro@fb.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Pengfei Li Subject: [RFC v1 12/19] mm, mempolicy: use first_node in mpol_misplaced() Date: Thu, 21 Nov 2019 23:18:04 +0800 Message-Id: <20191121151811.49742-13-fly@kernel.page> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191121151811.49742-1-fly@kernel.page> References: <20191121151811.49742-1-fly@kernel.page> 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 In mpol_misplaced(), we want to access first node instead of first zone, so use first_node_nlist instead of first_zone_nlist. Signed-off-by: Pengfei Li --- mm/mempolicy.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mm/mempolicy.c b/mm/mempolicy.c index 66184add1627..8fd962762e46 100644 --- a/mm/mempolicy.c +++ b/mm/mempolicy.c @@ -2404,7 +2404,6 @@ static void sp_free(struct sp_node *n) int mpol_misplaced(struct page *page, struct vm_area_struct *vma, unsigned long addr) { struct mempolicy *pol; - struct zone *zone; int curnid = page_to_nid(page); unsigned long pgoff; int thiscpu = raw_smp_processor_id(); @@ -2440,11 +2439,10 @@ int mpol_misplaced(struct page *page, struct vm_area_struct *vma, unsigned long */ if (node_isset(curnid, pol->v.nodes)) goto out; - zone = first_zone_nlist_nodemask( + polnid = first_node_nlist_nodemask( node_nodelist(numa_node_id(), GFP_HIGHUSER), gfp_zone(GFP_HIGHUSER), &pol->v.nodes); - polnid = zone_to_nid(zone); break; default: -- 2.23.0