From patchwork Wed Dec 20 22:44:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Hildenbrand X-Patchwork-Id: 13500624 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 9A445C3DA6E for ; Wed, 20 Dec 2023 22:45:45 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B507D8D000E; Wed, 20 Dec 2023 17:45:44 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id AD8168D000D; Wed, 20 Dec 2023 17:45:44 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 951568D000E; Wed, 20 Dec 2023 17:45:44 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id 6B7AF8D0002 for ; Wed, 20 Dec 2023 17:45:44 -0500 (EST) Received: from smtpin07.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay05.hostedemail.com (Postfix) with ESMTP id 45358405F5 for ; Wed, 20 Dec 2023 22:45:44 +0000 (UTC) X-FDA: 81588680208.07.1AC0630 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by imf14.hostedemail.com (Postfix) with ESMTP id B65BF10000E for ; Wed, 20 Dec 2023 22:45:42 +0000 (UTC) Authentication-Results: imf14.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Hp7ABkjX; spf=pass (imf14.hostedemail.com: domain of david@redhat.com designates 170.10.129.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=1703112342; 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=8A5dFtRO86PFrUgCRtietWW+Q/OHDectiZ99Zg/AfEE=; b=Pu0TGzKQkWQ4TV7ELeu6SMXmYIW7q3wCAAeXzrqV3jRmWa8xm3h7Z6IdEwa8g1xAHi36iv 588n9g2OMy3pzC422bOmgOXecPQjfxCykEfSdrB/1KxhfdR7kwOhm2iUl2BUA2EM77AqdM RHiNo6lIj5DZGdAEznmb0uxzW5hyT/s= ARC-Authentication-Results: i=1; imf14.hostedemail.com; dkim=pass header.d=redhat.com header.s=mimecast20190719 header.b=Hp7ABkjX; spf=pass (imf14.hostedemail.com: domain of david@redhat.com designates 170.10.129.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=1703112342; a=rsa-sha256; cv=none; b=zVsi25fMfRGQeLrR/jVwcu+45qfH74zB6mR2SMsDBobySWMyTkl7mBTKJC7cbnDS64yYR6 22w5B+G456/BlJZpSG5Y+s9TS6Pb272ro70N2Qu+SfyvdRYapw27QHihMwZR11H2te1Ofk 9+49twcOjPNoPlbmivbWrx3ek44hPS8= DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1703112342; 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=8A5dFtRO86PFrUgCRtietWW+Q/OHDectiZ99Zg/AfEE=; b=Hp7ABkjXkhs5zwakHqhLg2ZoVMu/iVTAopL+CrHV5XB8ZGwE3I+LJH0xpEqs3JfJB8knLG fuYL9ppAqoEox8ErK8xMjo77SKiFJibpz5vtnF6WNh1TduxOIGIWIugaQZ3GwkKTmQl7dS pN1StMo8+FbIWcU7Qi8yR/xjGKrwT9o= 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-137-HwopZXaBML6m-AFz0tciBQ-1; Wed, 20 Dec 2023 17:45:36 -0500 X-MC-Unique: HwopZXaBML6m-AFz0tciBQ-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (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 0F9B8848C06; Wed, 20 Dec 2023 22:45:36 +0000 (UTC) Received: from t14s.fritz.box (unknown [10.39.192.101]) by smtp.corp.redhat.com (Postfix) with ESMTP id C16A240C6EB9; Wed, 20 Dec 2023 22:45:33 +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 v2 11/40] mm/userfaultfd: page_add_file_rmap() -> folio_add_file_rmap_pte() Date: Wed, 20 Dec 2023 23:44:35 +0100 Message-ID: <20231220224504.646757-12-david@redhat.com> In-Reply-To: <20231220224504.646757-1-david@redhat.com> References: <20231220224504.646757-1-david@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.4.1 on 10.11.54.2 X-Rspamd-Queue-Id: B65BF10000E X-Rspam-User: X-Stat-Signature: e8czfp8y97pz3m5whednb55yd4azzs86 X-Rspamd-Server: rspam01 X-HE-Tag: 1703112342-148040 X-HE-Meta: U2FsdGVkX197jOW3elvsXtElhPAJhjPDRklYhL2GFnM63MKlXbLfbJG46YzhYDeMZ4BatvmN6CJLJIxkJQmEOIe7AQN9eXxl1WH+ACkkrour9XQ7oiJvbf3Lj6+HuzLHpWp5HRprYJQ90LFI8LeZBnkHP6Aut45vuHakGUp4asvzqvmVOBpYPmz3D36f46VHgvc8E87Fd27oF9Xm45cdkUk1mbGvkQJLKBMsB98Gl0+YamKswnmCRj2HI6BUqctMOieTCsJkR5ZPPVGqidgS0Q9w4kOaCojf2c2kXS0zeKDvrXL6Anr0udwbToCxAM2PM2/PtmXz/7Ez4c+t+9ebZtdyamvxIQOVKLoUAVfx8G6yJUXNkrGqA7y0Be18ZCc7LfCqnhdw1YsnBpLXDPvpjTmmbDpmzy2G44+qod+muzdUhpe0snCEQabgyAWb2in3F19akPKh9L6zdybAC3Ic8ub6+oRiGD9P8oIgI/eqm5z9l95QiTGomlvSN3hzn2bX3edWkKyzYK8TMVO3SGEUF6c0pHWqTGa1+2N3JNWeoJwbusz76cyI3hzgnW1ihAspN8LCAuE6McVjOyk7/p8r9c9Hwsm9LmdhVIf7oWdtOWNw/QZedRceyba2RogkzxTDS9Z71BRLdkRrGDI8hYKp01azQ74yUoDLGkOsOdomQm3C4VHSFj1SwLL7xwwk5YbUzB087baB1wAzhcgupwttYdiT14f1RfFqfCwtcjlxzY/zLQc3laRJqvLqAX8PXazNC7PfsWeiEgsYOcrsv30Dnk/9m56d/xRZWz8FTpDykha3xWuFjL4fspo3d2ySNmg6pnTppC+VoCyksxHi2aKjMz6YXySRPj9HB4GxqHMFW7bBWVr9/tewmQi0KQfTLO2mKIpYX/z0hh4eafYdRH5Ud/6RmPSeSVEZzEgr1ODEcG8Bz4Qf1aq9PJDF3HB79SLQ 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 mfill_atomic_install_pte(). Reviewed-by: Yin Fengwei Reviewed-by: Ryan Roberts Signed-off-by: David Hildenbrand --- mm/userfaultfd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/userfaultfd.c b/mm/userfaultfd.c index 203cda9192c29..5e718014e6713 100644 --- a/mm/userfaultfd.c +++ b/mm/userfaultfd.c @@ -114,7 +114,7 @@ int mfill_atomic_install_pte(pmd_t *dst_pmd, /* Usually, cache pages are already added to LRU */ if (newly_allocated) folio_add_lru(folio); - page_add_file_rmap(page, dst_vma, false); + folio_add_file_rmap_pte(folio, page, dst_vma); } else { folio_add_new_anon_rmap(folio, dst_vma, dst_addr); folio_add_lru_vma(folio, dst_vma);