From patchwork Thu Jul 13 12:05:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Miaohe Lin X-Patchwork-Id: 13311923 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 76655C001DC for ; Thu, 13 Jul 2023 12:05:54 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id CBD288E000A; Thu, 13 Jul 2023 08:05:53 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id C6D0D8E0001; Thu, 13 Jul 2023 08:05:53 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id B5C508E000A; Thu, 13 Jul 2023 08:05:53 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0012.hostedemail.com [216.40.44.12]) by kanga.kvack.org (Postfix) with ESMTP id A7DFF8E0001 for ; Thu, 13 Jul 2023 08:05:53 -0400 (EDT) Received: from smtpin24.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 774761A020E for ; Thu, 13 Jul 2023 12:05:53 +0000 (UTC) X-FDA: 81006459786.24.1A283C1 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf23.hostedemail.com (Postfix) with ESMTP id C7A2B14001B for ; Thu, 13 Jul 2023 12:05:50 +0000 (UTC) Authentication-Results: imf23.hostedemail.com; dkim=none; spf=pass (imf23.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=linmiaohe@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=1689249951; 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: references; bh=DrRSITCbcVtFINX/UJcI8U2TeBxKXffM8AxRmaKOstk=; b=DiMtnduJNXaxo9P+j6zYuSh6OfAi31+zJpB31udFYHnFLFINvZBCE0JUJEfvy52oJVSS2l WO/YKndQ+HK4gGaHfrspsucqqQSj6Fbj3fb/kFpWypask91UOIluNDnZAcQT6ZX6vNcOjT UUa4dyD21DQN7eNfpeMNKCG1Wq/PmMc= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1689249951; a=rsa-sha256; cv=none; b=j0aPkyQ6pMUJ+5Vw64Yyd3KugSuXduy4eFUCwm9LGnOrXZU7fKSLzfM799DCHwCzd3RRsd kGtunksYcfVveBUKq7VQFD5XIPWowScaERwAeUQxKPZip6VDjO6oCi/E34Y9BaXeuDqNrM 33+hGULheO7peIcEC6FmhxuDlykytgM= ARC-Authentication-Results: i=1; imf23.hostedemail.com; dkim=none; spf=pass (imf23.hostedemail.com: domain of linmiaohe@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=linmiaohe@huawei.com; dmarc=pass (policy=quarantine) header.from=huawei.com Received: from canpemm500002.china.huawei.com (unknown [172.30.72.54]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4R1tb90g7SzrRh9; Thu, 13 Jul 2023 20:05:09 +0800 (CST) Received: from huawei.com (10.174.151.185) by canpemm500002.china.huawei.com (7.192.104.244) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.27; Thu, 13 Jul 2023 20:05:45 +0800 From: Miaohe Lin To: CC: , , Subject: [PATCH] mm/huge_memory: use RMAP_NONE when calling page_add_anon_rmap() Date: Thu, 13 Jul 2023 20:05:57 +0800 Message-ID: <20230713120557.218592-1-linmiaohe@huawei.com> X-Mailer: git-send-email 2.33.0 MIME-Version: 1.0 X-Originating-IP: [10.174.151.185] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Stat-Signature: 6yfsyenf9rh7kp6owuiozhet97483req X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: C7A2B14001B X-Rspam-User: X-HE-Tag: 1689249950-896088 X-HE-Meta: U2FsdGVkX18eH5AM+nAaNLEDLRG9z6EQF+A35780ykSRy/RzgSvM7m3ADvHMDrURIe1rl9BzUwm/bX2wUAc14Xa20csWVNUTjDNg5YkUONFGLAIozLpJe27O6eaF5PX13WS6c1DF38O+FooGbFcmwLRAjBQReEGE0hmU1lCwAoPJB4bPbsAdIaJWWRxG/a+gexVd4xlb48vUiyZqVCLvqXVIx8FNZODLS9GzuUKcMSdqpN2E7hplcOlFwuD0DAgVOOc+B9GjZ05JtIyDaaHHQGKBGYjdrKphNofauz5g4iajyoAMJuRDEYcnDxxyGcSAVFR8eah/8agAG7+2GT1If5G7aDvw3IjGWsbFEEaI5vukossKnJqdgXL7rlPN8ag5WENxro4s4kPHEPBnGcYcCxEZlkhJHlwrdFoiBz+L0Hz1ZcxItS/p1QagETODM+2N/VqHNV0xsf54JeG/6yhRw/Ijt3tSrBpr+jU3QrH8ja3L0p6rDUcBssuA47m+pwpGQWf1/EoVXxGsLJjv1P3GscVn9xEZZKCiN6FffSrvSvKJw2tNcc3tldnewjgBNccc8JOMQNxY8j7R7rwhe6faFvvJfnZIwYPCLMAzlNzRA9Tw013YNzv1PmOeOMPZW2vFF3AfmNtqxUbQmj93Zp240rjLelEUeKSjCVjzgPI1PXmoFWB1xNhISxepzVyLL2uZyldOBV5XUzsismW48JtqjeaRRIf+tF+ydCVKcRam5BjJYAbJfoSV3XVKD3zai+enVpZZitUHmi+lchoq4wu3DAN297ova3BdJmRGUcHZca9k54BwNvFJwz1Vd646lkx2P1oSlgDYuc8JrSv1eGFbCXj0CZ9wzGojvOuUf3tMtp0ObIHP5VsChMHsUkk6/W9R0sS5gDTNCsMz6fPEm9rYgyyiNgQnVJw7LOv8a/0ycRYiUec3P/dvd7m3rOKTY4slkKOK9fPW74L4tfdCN9b Fdkgxqyz imnXXflKMfV+XgXAOuMkzG8g1pQKCg6YfYWBwYZuF1+SgaPXOMT+KWJBhZZyW4A3jygVuF00PpWlyiv934rmyJZS3yB5HfzSvBe4/n15j5kFvAVFk8UbrEAwRlaELEPL5qpMcjdp0HEzbYeNjmZ1deZYX4GxISvNZo8YEbwRclbVt+8IsaDXeuIj9oreH9RQL0WVBMZX1d3U4Kvsh+Q7zQYow0w== 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: It's more convenient and readable to use RMAP_NONE instead of false when calling page_add_anon_rmap(). No functional change intended. Signed-off-by: Miaohe Lin Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: Anshuman Khandual Reviewed-by: David Hildenbrand --- mm/huge_memory.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/huge_memory.c b/mm/huge_memory.c index 9f3109ed7351..762be2f4244c 100644 --- a/mm/huge_memory.c +++ b/mm/huge_memory.c @@ -2255,7 +2255,7 @@ static void __split_huge_pmd_locked(struct vm_area_struct *vma, pmd_t *pmd, entry = pte_mksoft_dirty(entry); if (uffd_wp) entry = pte_mkuffd_wp(entry); - page_add_anon_rmap(page + i, vma, addr, false); + page_add_anon_rmap(page + i, vma, addr, RMAP_NONE); } VM_BUG_ON(!pte_none(ptep_get(pte))); set_pte_at(mm, addr, pte, entry);