Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp503442rdf; Fri, 3 Nov 2023 07:04:48 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHS+iWvfNPY6M44CeehbpnYAYWOam2XyAQg9YcBPefCVnvEO/t9sM7O+LNXgHGMx5F+u+pE X-Received: by 2002:a05:6808:1a26:b0:3a7:d566:8b5e with SMTP id bk38-20020a0568081a2600b003a7d5668b5emr25426440oib.44.1699020288103; Fri, 03 Nov 2023 07:04:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699020288; cv=none; d=google.com; s=arc-20160816; b=jRkBWdcIMEceJ2+G0+0ZfuGjYpdJ2E7uEu+AZjOcZ7cYXqgDOOgsR/xsUuAQkaompd vqyTcfmr4N1uXS5US+ko+zU/AK6PHy/DD+xPLS8IzTdc2+ItxjEGu/zf07ETdTkgpQSg nQsaMs7hfHkyNckocD5AbE50yshA4JRd7D58NWjhbOsQAzUG8ECAGscUndLkVNJIJTJu WK0Gk57m2VwiNk3g4shGo4rT5YwWD79iFRwnRAY3oKGEiXPowS01sTZbULWpyRutTPv5 2k1A6YklW9y6+VVQZrXNgZu9UPlT225wiPIDbJFybXxftgjKnHtl+x3CZnOQ9tBN+Lqi G1jg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=ACB6BvRM+b+Bk9pCuWZqJNSMpJoUalDpqlkAQM+jcRA=; fh=kUj/5waaepfljbNx30rj2BALdV0u/mUCTaFWThlgquQ=; b=AZlhzIOt7/QmoSBy0OVhFlsYsk3YFtjjVAvTqJrU0mKgi42entHb+hiL87WSIo4J24 HswE2rEojBbhg3P7pWuME56prlsoAyWF+V7/lc3hl5PRaKQqsfEliq5bIxhhhrLyBwVw rUMobqh+P6C1L607WO5QMpPs3O5baq3KT8SIFPevh6V3JuXrz7ZiMnNTNkID2HpXSxVK JSeF+/b8RlTTnGm1PN76R2NYG59r27r8trwLo4aiAWXwEBYs3rmEFAfa6VAJi+iIXI6d eZQQlPcpkhA1LSnAJ5iHAuFU85T51OUFJ5fGEmvGS+kr78/LI57R+ixN0u061c/zBJPC B/hQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id d24-20020a056830139800b006ce2eb0b692si672199otq.189.2023.11.03.07.04.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 07:04:48 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id A1FC8826EC9F; Fri, 3 Nov 2023 07:04:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377877AbjKCOEG (ORCPT + 99 others); Fri, 3 Nov 2023 10:04:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37262 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1377813AbjKCODz (ORCPT ); Fri, 3 Nov 2023 10:03:55 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4703AD64; Fri, 3 Nov 2023 07:03:52 -0700 (PDT) Received: from dggpemm100001.china.huawei.com (unknown [172.30.72.57]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4SMMpP56DszrRgH; Fri, 3 Nov 2023 22:00:45 +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; Fri, 3 Nov 2023 22:03:50 +0800 From: Kefeng Wang To: Andrew Morton CC: , , Matthew Wilcox , David Hildenbrand , , Kefeng Wang Subject: [PATCH 17/18] s390: pgtable: use mm_counter_folio() in ptep_zap_swap_entry() Date: Fri, 3 Nov 2023 22:01:18 +0800 Message-ID: <20231103140119.2306578-18-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20231103140119.2306578-1-wangkefeng.wang@huawei.com> References: <20231103140119.2306578-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpemm100001.china.huawei.com (7.185.36.93) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-0.8 required=5.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Fri, 03 Nov 2023 07:04:40 -0700 (PDT) Use mm_counter_folio() in ptep_zap_swap_entry(), which help to cleanup mm_counter(). 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..f4a53f5b0bcb 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(folio)); } free_swap_and_cache(entry); } -- 2.27.0