From patchwork Sat Jul 6 01:50:44 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Wei Yang X-Patchwork-Id: 13725591 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 4C584C3271E for ; Sat, 6 Jul 2024 01:50:52 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 9C8256B0085; Fri, 5 Jul 2024 21:50:51 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 978506B0089; Fri, 5 Jul 2024 21:50:51 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 840086B008A; Fri, 5 Jul 2024 21:50:51 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0016.hostedemail.com [216.40.44.16]) by kanga.kvack.org (Postfix) with ESMTP id 65E246B0085 for ; Fri, 5 Jul 2024 21:50:51 -0400 (EDT) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id E594DA1EEC for ; Sat, 6 Jul 2024 01:50:50 +0000 (UTC) X-FDA: 82307649060.26.29C4A17 Received: from mail-ej1-f51.google.com (mail-ej1-f51.google.com [209.85.218.51]) by imf29.hostedemail.com (Postfix) with ESMTP id 48A7C12000C for ; Sat, 6 Jul 2024 01:50:48 +0000 (UTC) Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Yq5UKeQv; spf=pass (imf29.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.51 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1720230622; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:content-type: content-transfer-encoding:in-reply-to:references:dkim-signature; bh=H8EQp54O5oP1OWgQ2iSIxUEBigfegqYPeIu9MPUoBmI=; b=JHHbaJuO7q+iS6A2is1Ij8VhpuIA7d+F2Kb4vLAj65dAiLLPRRJz49P5dexUW4Nwmr6GpF EiU9Nu2ws6It6AZpj0Jt1fUwoRoASNtTygZzOcN9K7e4eorER9tcmE1xyIiXGvG6+Jg1qa EqiIGAThwEiM+ik5Z/PNH1FqcVDijY8= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1720230622; a=rsa-sha256; cv=none; b=JKNu6Gbb3P9NiCyWN/aAEn/+D/MIwjTEZphdeqP3G5LbCC32PUxdIdy/tuvfIIqh8rahL1 aZlhnAMGSMHuqr8758XOHSDGJ0uS4g/TMISDcyEmK7GMPjncsm6EP3DSdw8udznaD9zogZ mUO4WXhRMstdFeqfmWKbK+SL9kOvFwE= ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=gmail.com header.s=20230601 header.b=Yq5UKeQv; spf=pass (imf29.hostedemail.com: domain of richard.weiyang@gmail.com designates 209.85.218.51 as permitted sender) smtp.mailfrom=richard.weiyang@gmail.com; dmarc=pass (policy=none) header.from=gmail.com Received: by mail-ej1-f51.google.com with SMTP id a640c23a62f3a-a724a8097deso262747666b.1 for ; Fri, 05 Jul 2024 18:50:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1720230648; x=1720835448; darn=kvack.org; h=message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=H8EQp54O5oP1OWgQ2iSIxUEBigfegqYPeIu9MPUoBmI=; b=Yq5UKeQvxoKaSU/ogUnxZPwjdtPKImAUyGfB2dlHuIH4bkrphpBAjxiIovnvCuSQ52 PHTbkOQpVvqV2VfTku/PiVZ+of8HIpzDdL4rBx9hrJda50YuFtJvQVz+bKRzRozht1vw GhEe7qd+I4PuGwx9NfaMwatfdbCpq8TQ8FUF9v2rcotbxRXjVmL8Drfxf1xe2zFxkRzx G+OwOw+aFUAfvKthd079N795xfUv3oBeKaCuXc9W66HqniR8ruDZw6HgbsZVuCYcCPL8 QFLUtKIfDLXKXo+KGrlT3eD2TU5FvB2aeRKGFONFwiM9rRupk7Kc3N9PNl/QHYBk99O6 miTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1720230648; x=1720835448; h=message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=H8EQp54O5oP1OWgQ2iSIxUEBigfegqYPeIu9MPUoBmI=; b=tOJ5jXIWevJkOGnw+j7HFfRXn05jj3eKYCFHE6O5xRQbBx+NHNTZlTLnFmgciQ6/1e f+nHQO833ARpId0o/j6HkXdlbkggp85aoh5ktLCJdH+UiyksjMISWt3LSFYJolxi/Y2X mKETTTKkywNDTWZ4+iw211ssFoxWgq/cyXLbirZn6IoVTHqS47BbgAlorwTicnIjjmgq 5ST+mAVRLy0XBwn65y8ST7PPNHOyFa5Wn+pcl1mcfA1Gonc+ZRoEY7SGhrPo57x9caGM Dpmjm1z8xUIpZUpTJ6bwSgfPnBAk8MRBuo4W4pvHc+ZZBQGmrc5ATDa3ETC6Tq5shMsF v92w== X-Gm-Message-State: AOJu0YwlcdsshotHquEBZyiPIjeRFTCvna1w5fcsl8Sisq4AHEPa4Fus hjccA6YP9K9ZGTT4+xGgL54kStNjJC6wjDK+VfflWZrdPkrs0IEjXIEWzSbG X-Google-Smtp-Source: AGHT+IEVPCwr97DWZsgwh41JkqGBpcHQyz2WfgXIdhOsUrBX5lQMtl8t/s78r727EXWjdc7xPHf59w== X-Received: by 2002:a17:907:969e:b0:a77:ab40:6d7f with SMTP id a640c23a62f3a-a77ba482a47mr509688766b.43.1720230647340; Fri, 05 Jul 2024 18:50:47 -0700 (PDT) Received: from localhost ([185.92.221.13]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a77c4cdee52sm137042466b.128.2024.07.05.18.50.46 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Fri, 05 Jul 2024 18:50:46 -0700 (PDT) From: Wei Yang To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, Wei Yang , Mike Rapoport , David Hildenbrand Subject: [PATCH] mm: use zonelist_zone() to get zone Date: Sat, 6 Jul 2024 01:50:44 +0000 Message-Id: <20240706015044.27789-1-richard.weiyang@gmail.com> X-Mailer: git-send-email 2.11.0 X-Rspam-User: X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 48A7C12000C X-Stat-Signature: j37m6respswdw974mhziuyoo6c7t6qhd X-HE-Tag: 1720230648-610392 X-HE-Meta: U2FsdGVkX18TasQyt166T/hH2e6cT++5huOZdrB8DC2RbKA0fLxuc75kCGMo44a5UcKnQ0tAMdvgg4zIvYEUoNJ7C8/DOCylmnD9zSM7qSMis/SQgi9mcs43p+p7QHKIsWj/aWjap5w+UmUwOYgVg1xFfHW0AAPt1S57sKEDuLAp3pZCqx0HJwUogs2cbWrtixb0g1fmauTvjwUo2q07wB1vQ/TOXruczIBEcgw0HjsrZ0WPcoVVZXG05YzKWmjG24MCmqandKysQtba6TN2WvMcuG0xkB8Ol08OBReJmRU/r44L5DFJ7LKTXYapKCinEjuVka+m8CvlDuFQXs8p8+qMIFQ+GsIGf5hn9YGzvBNHsOy/yLrpO+ys8gr3hsU8HwRmWGsAgXuMsgIwyEI9xRE+PRyM5vvC8MdEGtgozHYysfMGGF9aShhItrR5Zv7dS4lVxGRtktTKRYqPQU0aC9b3gygh93qFTpBm7Xi9vhVVky4OunKN3ifNz6KUvkdVW1WceGsMyjVqKI7n4W+smvky4TmIN06CrErahgBIO6qnYfuboxpOow1R46zcdSRYh2kwferqieBgH0F7wCPGdQK0+F9byhzRsh7Hb/Tp0U+VHoybXI0aCuQG83H7N/S0aMAUpW1HMLMDPT3yfHOdDyT46iwN70RI78cIiFCssZiIpjYbqyGr5B49kcL4YYqJZAUNnzmQ95zamhfRV5bvbdkqoBVkr/7VbHuWIedR1bgkYan5h/x5WXr39e8GTocSYRPw6mkt9v5bqdY2jPq/m4N4AQLyEHnhWjd3W2vy9l6Yhm7J7zddiiWRlOvtQ7zc67k1vdqkBg2AEoUAF8bJWXYXU4Eabh1jMArvVPLyVTnrrizpr3G1uXGCEO8DohbVV/wL12+Wq5Vef9pwZL8GDPOwfnB1VO6rkztjFKlLES1vfYIIDI5QSEUyut42grjZmC9SARLUpcXOBeHvXoB AY4AGZTs fXAt1DN31XNCaSvPleT/NEXDh241GqIEZG2G7bD+ZLKI2fhvt7dss6CeQ2C9j3nuf4euXn1UhgnkD/N3+2olGoDfs/zWWDbq84VYdMLjfQd4WtqMDjVpIEwAjLiV0uTdz3XWi6lK2MDjZ/eB92CIJTaq2MFF+P1Wvmvc8Ty8R00iHuXvrR3x0yEjH7P92ZJ6bSP7GKfv5khmooD26mkXiHe9xoqMCjT5ASiiG0RMtkcrg+EFRVBkZBXCdlYLiZF+pRowlR0sQZ78/lenTRuXsa+1QfiVkgYRNlx0m2enDRVj/rYNdobpHxSGsMVRLs5qAo10g5Pf1Gx7APjaCaT/t9BU/uZbBIT84wOuUboDMW9jQhdyV8aGbE6BvcJOBVl0V5mXMOXbZ3JB5RwPQmf4Klt1IUzCDcBI0zZ9uIaxiOixpCjAP9QpyABMmFelaHn2Vifi8fXNef9e8V4By91seDxrreZBjZxoQ+J3Cr02/hGnsJ23gNSrUVKhx3BakPzg+125+2FgyZjFB1I0cSRb/d53y/KBRCtU5Easl X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Instead of accessing zoneref->zone directly, use zonelist_zone() like other places for consistency. No functional change. Signed-off-by: Wei Yang CC: Mike Rapoport (IBM) CC: David Hildenbrand Acked-by: David Hildenbrand --- include/linux/mmzone.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/mmzone.h b/include/linux/mmzone.h index cb7f265c2b96..51bce636373f 100644 --- a/include/linux/mmzone.h +++ b/include/linux/mmzone.h @@ -1690,7 +1690,7 @@ static inline struct zoneref *first_zones_zonelist(struct zonelist *zonelist, zone = zonelist_zone(z)) #define for_next_zone_zonelist_nodemask(zone, z, highidx, nodemask) \ - for (zone = z->zone; \ + for (zone = zonelist_zone(z); \ zone; \ z = next_zones_zonelist(++z, highidx, nodemask), \ zone = zonelist_zone(z)) @@ -1726,7 +1726,7 @@ static inline bool movable_only_nodes(nodemask_t *nodes) nid = first_node(*nodes); zonelist = &NODE_DATA(nid)->node_zonelists[ZONELIST_FALLBACK]; z = first_zones_zonelist(zonelist, ZONE_NORMAL, nodes); - return (!z->zone) ? true : false; + return (!zonelist_zone(z)) ? true : false; }