From patchwork Mon Dec 11 15:56:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13487458 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 3C1DBC4167B for ; Mon, 11 Dec 2023 15:57:56 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 801D96B0118; Mon, 11 Dec 2023 10:57:51 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 7B1A76B0119; Mon, 11 Dec 2023 10:57:51 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 653126B011A; Mon, 11 Dec 2023 10:57:51 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 4F1A06B0118 for ; Mon, 11 Dec 2023 10:57:51 -0500 (EST) Received: from smtpin27.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay09.hostedemail.com (Postfix) with ESMTP id 26775806DD for ; Mon, 11 Dec 2023 15:57:51 +0000 (UTC) X-FDA: 81554993142.27.DD7246A Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by imf03.hostedemail.com (Postfix) with ESMTP id 5DB222001D for ; Mon, 11 Dec 2023 15:57:49 +0000 (UTC) Authentication-Results: imf03.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=N8J4wquh; spf=pass (imf03.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1702310269; 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-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=g4JhnXoUG0c2uPae4pqIp1MlWaLrLx7AL/tRs/hDXm4=; b=xldRb+fi8tbcFGwUFfon+EeAea/btmyvvmjPoRtdaaGtx4uaSS7XcIc394y0q3SU+h9dnz srDx2euhMS82u5N3szZrVImYqcfmrOLVGxjnJjVFI70/TB2YMECQszCdyIjkJqZSMggZL1 OqXVTtzTrmy5nemLIN92nPvv8xgYN/g= ARC-Authentication-Results: i=1; imf03.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=N8J4wquh; spf=pass (imf03.hostedemail.com: domain of david@redhat.com designates 170.10.133.124 as permitted sender) smtp.mailfrom=david@redhat.com; dmarc=pass (policy=none) header.from=redhat.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1702310269; a=rsa-sha256; cv=none; b=VL1c+L/oAJdt1+/PuhTroYqjMI3mdr9qkoApkcc2gIInqe+2sxCe86fq+BxEiKXNHyfGCa sFlpRBJSqL0MHUgFoVMhb849KNS23SlvEEeiKca8Uwm9y+XkGr9OcH+znMPebhSDHGCyn5 cwpga5Z8Adr7DTLNwnzgi1J02lbg3x8= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1702310268; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=g4JhnXoUG0c2uPae4pqIp1MlWaLrLx7AL/tRs/hDXm4=; b=N8J4wquhsajpoHQiXXHeT6Pkf6vghjAvA8D7EzYYWjaKc5lMh89bNsJQCXgdfpnMlKD+8q k71TlMTJFMpDZkKhstV7nuuOBICxeSLavLEBC6+yt9SwsQvtdJH5R/0TREM6m1rPyW4Mxw 4Bk63TrATiE8vhUWVIKrxoZyIUDhPMc= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-350-BCpQV4YyOqmsm67nADb-VQ-1; Mon, 11 Dec 2023 10:57:45 -0500 X-MC-Unique: BCpQV4YyOqmsm67nADb-VQ-1 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id 918BA848A64; Mon, 11 Dec 2023 15:57:44 +0000 (UTC) Received: from t14s.redhat.com (unknown [10.39.192.166]) by smtp.corp.redhat.com (Postfix) with ESMTP id 03BE91121306; Mon, 11 Dec 2023 15:57:41 +0000 (UTC) From: David Hildenbrand To: linux-kernel@vger.kernel.org Cc: linux-mm@kvack.org, David Hildenbrand , Andrew Morton , "Matthew Wilcox (Oracle)" , Hugh Dickins , Ryan Roberts , Yin Fengwei , Mike Kravetz , Muchun Song , Peter Xu Subject: [PATCH v1 19/39] mm/swapfile: page_add_anon_rmap() -> folio_add_anon_rmap_pte() Date: Mon, 11 Dec 2023 16:56:32 +0100 Message-ID: <20231211155652.131054-20-david@redhat.com> In-Reply-To: <20231211155652.131054-1-david@redhat.com> References: <20231211155652.131054-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.3 X-Rspamd-Queue-Id: 5DB222001D X-Rspam-User: X-Stat-Signature: rk1y3rdxxr3ypse7ubfxzf3r7n1rtedo X-Rspamd-Server: rspam01 X-HE-Tag: 1702310269-278521 X-HE-Meta: U2FsdGVkX18BZsIHwvQVH9OoDqmvIN5ziGMAR3LN3E9fu8+3GXtRBCvbIyLVu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K4TVTGyqbvBoI1B0zpfm6rLDgAuASBIFdicNYqgLfkpYfQlblMHq51aqcW+mSCsrfEWlkKsA== 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: Let's convert unuse_pte(). Signed-off-by: David Hildenbrand --- mm/swapfile.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/swapfile.c b/mm/swapfile.c index 8be70912e298..25f53bec5097 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -1805,7 +1805,7 @@ static int unuse_pte(struct vm_area_struct *vma, pmd_t *pmd, if (pte_swp_exclusive(old_pte)) rmap_flags |= RMAP_EXCLUSIVE; - page_add_anon_rmap(page, vma, addr, rmap_flags); + folio_add_anon_rmap_pte(folio, page, vma, addr, rmap_flags); } else { /* ksm created a completely new copy */ page_add_new_anon_rmap(page, vma, addr); lru_cache_add_inactive_or_unevictable(page, vma);