From patchwork Mon Nov 6 15:49:42 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13447138 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 E3AAEC4332F for ; Mon, 6 Nov 2023 15:50:13 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id BE7AD8D0002; Mon, 6 Nov 2023 10:50:10 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AD07B8D0027; Mon, 6 Nov 2023 10:50:10 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 8F8F48D0028; Mon, 6 Nov 2023 10:50:10 -0500 (EST) 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 6DA128D0027 for ; Mon, 6 Nov 2023 10:50:10 -0500 (EST) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 2647A1A078A for ; Mon, 6 Nov 2023 15:50:10 +0000 (UTC) X-FDA: 81427965780.18.BFEEEB2 Received: from szxga02-in.huawei.com (szxga02-in.huawei.com [45.249.212.188]) by imf18.hostedemail.com (Postfix) with ESMTP id C57761C0022 for ; Mon, 6 Nov 2023 15:50:05 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf18.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699285806; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UmujaejCASjfQtJbBR1EzDPhPNeOSdCiPLhgFsCit5A=; b=tCgiSJeHmwQvWLqgDfjYqn2zTtf1aXZyZGTmGg1tIYTKqVE7QUVfjqRbmgmY+uu1hB1ijv NGn5u+GK+fEz56sbVLygin5AbAdmOEbiYtjqg+Hm4qvhBk19F+24AZlLnpZxi9tH1pIlQR hkmOdoUpPFz00+lwhpPxFAn7VNeGf0c= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf18.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.188 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1699285806; a=rsa-sha256; cv=none; b=pwaRJi+xqAcWCVO/TWHNG1Ri+qize+K1FwXiR5WyM8q66y7bprfD5Hv9ePWga4zoCIWtJe DC2yClUMyMP14X9ZxZ3wl3VejJL+0fuGENDYr9YNvQ6B+gobV36KT9VQJABVx6qGPxtYtT dzcCEs7DFH6guAfdr4faPN+Ov2MbZFE= Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.55]) by szxga02-in.huawei.com (SkyGuard) with ESMTP id 4SPG4t11wVzVlmQ; Mon, 6 Nov 2023 23:49:50 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by dggpemm100001.china.huawei.com (7.185.36.93) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.31; Mon, 6 Nov 2023 23:49:59 +0800 From: Kefeng Wang To: Andrew Morton CC: , , Matthew Wilcox , David Hildenbrand , , Kefeng Wang Subject: [PATCH 02/10] s390: pgtable: use a folio in ptep_zap_swap_entry() Date: Mon, 6 Nov 2023 23:49:42 +0800 Message-ID: <20231106154950.3399469-3-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231106154950.3399469-1-wangkefeng.wang@huawei.com> References: <20231106154950.3399469-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Rspam-User: X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: C57761C0022 X-Stat-Signature: knc8y3b9cck6yqg4irqn4bznt473cwb4 X-HE-Tag: 1699285805-450556 X-HE-Meta: U2FsdGVkX185OJlvhJS/sn/85fa5q/rK6bZRlOPOWw1v6B1BVdAjBuz+LgffaBME+brH0irDo0/GUDqBQw/66WlnCWkNWpRlVuYpRpWb7Mk/zS/ahBWZAilHzTcewnACpkKZOUJ1XdOEqG9MIiMkq9uq+TUs6HtiGvMtLcCpI87JEDp3lV4Q3XntZpG/uxZibs2kJjUwbJGO1PaThGrzBL0ieWY7reqRMwgHJL2Xz1i1udURZ/tnOE9sTpIkq1kLInZOHdSBG5u964UNNGorsQZNsQXqmEQXpH9NQqpYCb/tE/WjkNEqeF8Wbj4LSBISr46qcQ+HVVvB2uM5hvVLRY0N2j5u10vG8b1nxTc5YnwZ4MY+zbuNuT4U55lHg1Hd/+5hZ5/oDn8Vz3GdYuHo7PVDvRQdWLdz9ubTF2MxnVjeANBBxXuKukS7GpiZKyKX98xTp7Ooy8gPqKB+jtqsmu254bmzMFtcgHAG4pjnHrxlLP51f3LbFKK07JIqz/tPe8NHVGHyqU1AqEBWpZqNmIOJ9kA0TWkU20am41BdNs4nHmyUmxxYq1C0j9cdY/wRNin/wEVsngg1Sqfeej109n0faRjDH6XHW9fVYVp3HEyhG5U9IGIyFNFEAqgMg4RJkjv1+/1+EuUOFrqhpCRM8tm+sCYKUb/rxBaITz14OZYKOh98MVk0lp/TW1kW75hNQYMgH7CBlaPuB0cMefz3ZNPRGpaSGzdxqgWE8LDzo2WY2Ol4p8SvY1463J0VfW8vW6Ov0RmkcF8VcPlmArraqsYgI/pGztiBzBRR3T20d10QmV+eFphbw7FAKRNqhnRY7pfCylT0rKnmVvaYUNbpNr2PXfzObJpnwjTszloWmtUHDKiipF1g4Fps588WdEbvif/uqxByeywkHxXTF8TRt5jAXAqXMgG8YajxLl/ozw+eMWx/0RKdpNAkcwe0CMeNXEM51I0Es/BGqsVmnG9 k8g4k9XX HsWwGoq1XStwFe7U4TtwIYUvdHa4CfajnyjX4oxXEj6U/OnupSPn2yBNbyR6sorJdQtslwPrIa2bTf/e6bhKshCX/O9RR/sULNtomYgJb9YXAVe48ckItnHjqxgmgKxXEGVi0QxyffKT2o4PatlMPH2TbiI2htkLj9XkFG431JyUPVKVFMvOHj4PsbdfcJx/jNPA8 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: Use a folio in ptep_zap_swap_entry(), which is preparetion for converting mm counter functions to take a folio. Signed-off-by: Kefeng Wang --- arch/s390/mm/pgtable.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/s390/mm/pgtable.c b/arch/s390/mm/pgtable.c index 3bd2ab2a9a34..2f946b493fff 100644 --- a/arch/s390/mm/pgtable.c +++ b/arch/s390/mm/pgtable.c @@ -730,9 +730,9 @@ static void ptep_zap_swap_entry(struct mm_struct *mm, swp_entry_t entry) if (!non_swap_entry(entry)) dec_mm_counter(mm, MM_SWAPENTS); else if (is_migration_entry(entry)) { - struct page *page = pfn_swap_entry_to_page(entry); + struct folio *folio = pfn_swap_entry_to_folio(entry); - dec_mm_counter(mm, mm_counter(page)); + dec_mm_counter(mm, mm_counter(&folio->page)); } free_swap_and_cache(entry); }