Received: by 2002:a05:7412:8521:b0:e2:908c:2ebd with SMTP id t33csp896369rdf; Fri, 3 Nov 2023 20:56:30 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE7UuYMhMQ/uMXniflCaVpdXBt+6vimBbENR84eYETeNYXgDd3i5+NdLs9Z8dwWaU7fQMng X-Received: by 2002:a05:620a:86ce:b0:778:9be8:275c with SMTP id pr14-20020a05620a86ce00b007789be8275cmr25877330qkn.33.1699070190386; Fri, 03 Nov 2023 20:56:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1699070190; cv=none; d=google.com; s=arc-20160816; b=MCxKwkXeN+JIL1ADqsPTjBm5cKr8smlLCUkUfHfHoLsTWAoHOjU1b1COvFGlVrPRFD uwAu3KXCTZYhWnb9c/BqZLfTE+8S0UJhJfaA71Kmrzp+yLfVEjiRfBo8rDD13Ff+nYMG NBRamX2CoaYXCnWe7i19LG14gg3IujXfPNmKTlNvGiN4R4th8YW9rSEw/P6Lqs4qYv3+ F3x0r1T0A0ckoa6CXRF1M6WtdHKdHlJzEcKCWkQzVzK6Mueyl7dFlyXvj0yhd/X0R6P6 /vO7huTokVpDnenoyppagNTPzR2v2GkIslIjZF06UIX8F2Gs0EUzOiSh693qwUVsZ5zx D95A== 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=UmujaejCASjfQtJbBR1EzDPhPNeOSdCiPLhgFsCit5A=; fh=kUj/5waaepfljbNx30rj2BALdV0u/mUCTaFWThlgquQ=; b=D8Uz+W2RBUOI2n/W87Zi167PKECVjStkec30o3Jv0+T7qvkZKrgw1FVyFOQIAOiaqB kradYHVajWehGT9zxTNJPZSbRf1tn/04ar28PBENRG0byeQ6FowsqaLWr4kbrj/vrbZb kPaU1CdOoUJwWq6Oq3XliLrcQseipsVyihu91VMnqmAy/xHWuOShDs7EkhVPwBRV/zDw UyrxKzbhQT5/rN+b4h6Pku9eB1XAdurFl+DEjwR9C8ZPyp2i9ynWkO5sO9Zs3TCc/zYF v8EJfRawzX0HetCQE0YobS3vOBpG8UluuPyAz1MyWOPbh8PRVzGn8JclRkDD/BZ4xxGi AmiQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (fry.vger.email. [23.128.96.38]) by mx.google.com with ESMTPS id lr7-20020a17090b4b8700b0027d2db562d2si3082110pjb.161.2023.11.03.20.56.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 03 Nov 2023 20:56:30 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 as permitted sender) client-ip=23.128.96.38; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.38 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 fry.vger.email (Postfix) with ESMTP id 35A0981ED52A; Fri, 3 Nov 2023 20:56:24 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1377979AbjKDD4H (ORCPT + 99 others); Fri, 3 Nov 2023 23:56:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59642 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234297AbjKDDzs (ORCPT ); Fri, 3 Nov 2023 23:55:48 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B5CDD45; Fri, 3 Nov 2023 20:55:44 -0700 (PDT) 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 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII 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-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 fry.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 (fry.vger.email [0.0.0.0]); Fri, 03 Nov 2023 20:56:24 -0700 (PDT) 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); } -- 2.27.0