From patchwork Sat Nov 4 03:55:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13445390 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 49374C4332F for ; Sat, 4 Nov 2023 03:56:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 907728D00D8; Fri, 3 Nov 2023 23:56:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8B6598D00D5; Fri, 3 Nov 2023 23:56:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 7CCBD8D00D8; Fri, 3 Nov 2023 23:56:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0017.hostedemail.com [216.40.44.17]) by kanga.kvack.org (Postfix) with ESMTP id 70C888D00D5 for ; Fri, 3 Nov 2023 23:56:11 -0400 (EDT) Received: from smtpin10.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay10.hostedemail.com (Postfix) with ESMTP id 4549EC0EB7 for ; Sat, 4 Nov 2023 03:56:11 +0000 (UTC) X-FDA: 81418908942.10.6AB9528 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf06.hostedemail.com (Postfix) with ESMTP id 0710818000C for ; Sat, 4 Nov 2023 03:56:08 +0000 (UTC) Authentication-Results: imf06.hostedemail.com; dkim=none; spf=pass (imf06.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1699070169; a=rsa-sha256; cv=none; b=MarrlijTmVQnrDLZ1vvfj0ksVV2cmJF0Nxd0QEFWiGeFDS9FipOwGddl/fK6LaXEOhogBA gff/qIMbBs/YlO8c9zyksPdyGUmMToHikRbhPsk9R/2qsR3v74m8F5X001RLAGMm7w+JF5 6HBV8qUUi8AjS1Ey6vK6tLEOiE8Bhho= ARC-Authentication-Results: i=1; imf06.hostedemail.com; dkim=none; spf=pass (imf06.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1699070169; 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=42KRHwIwUjQ3zCLqS1zek4dfiKDEggAn8yloF0+T2tAg4T0gKyakzvjP2hvBuCnXK3+Jan rVRnRuKQYTrSjFDfvji/x6DoxYEZ09EGbizfbyCBIkyaZbesBE+QsLLmyWfZfG3sk+gaEX jIlfJZfG26F8rRl1wZGRTz6TQ28fy2s= Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SMkGD0WzxzrTQX; Sat, 4 Nov 2023 11:52:36 +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; Sat, 4 Nov 2023 11:55:41 +0800 From: Kefeng Wang To: Andrew Morton CC: , , Matthew Wilcox , David Hildenbrand , , Kefeng Wang Subject: [PATCH v2 02/10] s390: pgtable: use a folio in ptep_zap_swap_entry() Date: Sat, 4 Nov 2023 11:55:14 +0800 Message-ID: <20231104035522.2418660-3-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231104035522.2418660-1-wangkefeng.wang@huawei.com> References: <20231104035522.2418660-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems705-chm.china.huawei.com (10.3.19.182) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Rspam-User: X-Rspamd-Server: rspam06 X-Rspamd-Queue-Id: 0710818000C X-Stat-Signature: 8sqw9g49pkqxe14rtt33wjnt4abu5e5g X-HE-Tag: 1699070168-780794 X-HE-Meta: U2FsdGVkX19SzcVGtKo4A6HMA/+MjD0Os9YAtD8fQX2MSPANJOvfcMf8NawUNsRUrgO7XjXwxeIvIU6emUtJ88C7HCPQy2pgWRRV5T7h36rtQICMlcdOhY6WZqD5tzz0eoCx6ULKZjFelgo68DdJrm5He/50Q2dVWPi/N4MpG6BA9lv4Dxvoo+EUA18tsZp1Rno9Ln08aWMYR/4h8HCgKwC9WLYE7AC3cZYZF3HaYBdHG/kBeWxnJm0nDz6k9fBlFKMJVtdcnzzwK+F/8B8w68jBsinjSyWpT8Sr8jhIZeCTBJtO2sWnD2EobEwnIW5txHpsvOlnxuBbl+OVa7ZNIyo3tVv3R1CcM1vqpzwC9++OwlQ/wuadzcvzIJSRQqDYv9evBiCE73ssO2afyPB/kHLXjAlI3tE/vFQKmmIFALC7IDvDrMPW/s7Dm2CpMcD+BxBKCXdxTirC1sAk4Z74eMKlpwS3rI4J2RyNrPrEGlkNZwkPB5wxBMeWDRsX1bCHvBRYyJpADj9+se1KGhQxlr35VFHKcBkItuq3eXCQJAIuZdKDzDFEQG1fq4tTJBc9gvF1ALYaZiw0v+/34ZX2/6wMgBw3eYAoF7HwiCe161rgWnpv0EMLJsu8oXmyITBRjFDy6OfeiVlM1Huq15DF3/5vlKWdXis+LORh0QiQHuVQIYvWbbQs3jJXZRerpPoQHMBjNm+AyyB9LTjzYbJzdswXF1JX9Mi0LGOV0o0Q63Wyvl3mojowuEwNOVhcif9HOVsFqWoMA2snbkOTUOpbeLDnHEgfK5EAgPKz0D1xTe732o7iuFTyOY6L1XMIDc3MVdoU3CyX1u2MjOdM0EZ33nX6Pc3cfCXKa8CV5TPFPJP3PPyIPcpTCN+7anoQuEFGx1UVHZMq81pFtj+33VXdL8HCyFun5sbuu4ijOmJo8L0nt2H71yem/RWdx/nVx5Y6ePffljd6XksR5r3Ryf7 R1gY1Stm sdWXYtpTt2QjR2TmRiKq9dWe8A4kDb/HfOBUFnfd92usQeRJ+B8na97WiNg5v74n01pFEbGADPL35KYCgYGYxWJVmJdnELTdVeyboPrZ/18lwimmhgNi0Z0Nh8Ha7vXxMNPKI9jugtMq9gnx6iv6ts9AYP8TTTHpnTmSn03D8vrFDQTF3rfCF7S1VUDx4jKDhslpa 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); }