From patchwork Tue Jul 9 10:55:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kefeng Wang X-Patchwork-Id: 13727664 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 62F33C3DA42 for ; Tue, 9 Jul 2024 10:55:21 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 895916B009B; Tue, 9 Jul 2024 06:55:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 8450B6B009D; Tue, 9 Jul 2024 06:55:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 734426B009E; Tue, 9 Jul 2024 06:55:20 -0400 (EDT) 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 55FF06B009B for ; Tue, 9 Jul 2024 06:55:20 -0400 (EDT) Received: from smtpin06.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay01.hostedemail.com (Postfix) with ESMTP id C15801C2FFC for ; Tue, 9 Jul 2024 10:55:19 +0000 (UTC) X-FDA: 82319907558.06.A1ACF0B Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf18.hostedemail.com (Postfix) with ESMTP id 6F0821C0017 for ; Tue, 9 Jul 2024 10:55:16 +0000 (UTC) Authentication-Results: imf18.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf18.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1720522493; a=rsa-sha256; cv=none; b=EKwvrD3u8IWyQ3dREGc32BSzNdDet0YVwPUtJ+gPHNqm4M1BcL0uP1Mza6NuelA9KMnbQt ZspzUPM/XpT3dUKKJ/sb6yugu1iwssXyxAk1eo83YU/CLTt83ABDTNZ5auSAEpBRqZetlW 9KbBht5CMcDCR6ahT91SphbRKc3Y1oc= ARC-Authentication-Results: i=1; imf18.hostedemail.com; dkim=none; dmarc=pass (policy=quarantine) header.from=huawei.com; spf=pass (imf18.hostedemail.com: domain of wangkefeng.wang@huawei.com designates 45.249.212.187 as permitted sender) smtp.mailfrom=wangkefeng.wang@huawei.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1720522493; 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:in-reply-to:references:references; bh=N8mOWZRcsNzNPXSonpa8TmdDCSm1Spq+rTvyFtmGkwI=; b=H00FKAo2Z30feugO3244q6NGxzbkqVw9RGRcxBNlLMaiuz0Uit2Wkhij1HJ6pBtilSjgCa ilM74JUFHVGFRC94fz5P8cYkWI39E2bWv3geSMRUMNLIFaU0OGX6WTFMSIuzkwChoARSrU DLPsNSVSzbPCYnJJB9EJPqtmGBGY3tM= Received: from mail.maildlp.com (unknown [172.19.88.194]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4WJHp568J1zxVp5; Tue, 9 Jul 2024 18:50:37 +0800 (CST) Received: from dggpemf100008.china.huawei.com (unknown [7.185.36.138]) by mail.maildlp.com (Postfix) with ESMTPS id EDCF91402C6; Tue, 9 Jul 2024 18:55:11 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by dggpemf100008.china.huawei.com (7.185.36.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1544.11; Tue, 9 Jul 2024 18:55:11 +0800 From: Kefeng Wang To: Andrew Morton CC: , Hugh Dickins , Kefeng Wang Subject: [PATCH] mm: swap_state: use folio_alloc_mpol() in __read_swap_cache_async() Date: Tue, 9 Jul 2024 18:55:08 +0800 Message-ID: <20240709105508.3933823-1-wangkefeng.wang@huawei.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20240515070709.78529-1-wangkefeng.wang@huawei.com> References: <20240515070709.78529-1-wangkefeng.wang@huawei.com> MIME-Version: 1.0 X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems702-chm.china.huawei.com (10.3.19.179) To dggpemf100008.china.huawei.com (7.185.36.138) X-Rspamd-Server: rspam12 X-Rspamd-Queue-Id: 6F0821C0017 X-Stat-Signature: 6mzo1f3zizq3u5uz78z5emskcng7d5qo X-Rspam-User: X-HE-Tag: 1720522516-881441 X-HE-Meta: U2FsdGVkX1+eUxGQHJ4QuNvi5+ENw/66lPAO7kuSXazwSe3JW+VMlRdPVh/UyQxOfkhy2U4cBYRDkepry72NmpJRc4FZ4KsZoVhTudjqso9FihhESN5IutquVCcC8U9QroyQAojr0yqLjWumUVqD/eART+DxDjNFc+v1pdBGXDGI8+cScbTH7l5PtFBJg5lNlhw0nw7kSk+rA+WrxEMbkSXYGdBtQJ5U0j19D6YIFStfoctplXhtWmOpJrJZEfaewxTjKX5dwogeHMy7NlmPZ0TOR8OfcSeeF3mjjZvrCymM4gdRw774W+kwMq6R8xiNdOntD4o5WSQ7nLL3TPlzwZsUhjD/pd4f6XcLUKlTOPDNPiKkEr1S8+20XwsSD70lQWIeJIu/MCQt0kXonCgOYDO/n9g2xp7tEQnKsZAZ1OT+6f8XMZ3qdNVPOTIomkQh244mrUwqe2q5HQZcYwbDsuH6cJGCmWl995A7fg2MOMolwqSnmg2OmqzwOlFI0qO6fbj3r5jz2+7YQ/Z58Nd1FA/QWVZSHvTLkxKn+WFGWJ0nRMjO8X9YaMrJ9qElSrJt4irLsnAvsdFuU7q705y3hd/pcBfCHSfhwvDyHHv5Ro1N7O3kCokGGQCvsBvUAlduJkO8ALYlF0dMijS+wGh8tTIos6p4LGHvvahdTXnABC+u0nqfMTFO2w33nVvl2P2wnVnaFwugsEQt+1geFaeTVWcfX9KGWj5iMKqD6IYXPjNTUHdz07H6jkdCCkG3+j8jgGbxCCk8ehSvty46cRvs3Qn4X286jjCtT4ztucaXdOPwrGrlWFc+mKSyAo+joV8WddTJ+WPYscVqMIwXPpR4BOj2WQugIhxqhwk9ovWz3TSSeEggO6uFGT8WFBboj2fPb2Q+q+cllrAWpQeeryQ3xDcPnNZoHijEeux6Or71sObdTsRYb/aLe9/jhn2W//JrFUIW9HqIqPUOLIYYu8D WBeGnUgK lZA9Cxdh1dm8NgPk5fc01bI3EdkU9xBfXjsSGMDmcSFhcNc9FUPrO2GkGgSP08fcrwLa+I5n2FyP//58irx0Hu6W8fzsP49LIcxfKPz24uTH0DrHpAXObmKtZYgc8H9QqUzO2WjQS+NpnQYlOisdCaqIhDMtq1RvSeZbpL5ChsRjug31SK5WqE+mhwJMf690I/npV 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: Convert to use folio_alloc_mpol() helper() in __read_swap_cache_async(). Signed-off-by: Kefeng Wang --- mm/swap_state.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/swap_state.c b/mm/swap_state.c index 994723cef821..a1726e49a5eb 100644 --- a/mm/swap_state.c +++ b/mm/swap_state.c @@ -470,8 +470,7 @@ struct folio *__read_swap_cache_async(swp_entry_t entry, gfp_t gfp_mask, * before marking swap_map SWAP_HAS_CACHE, when -EEXIST will * cause any racers to loop around until we add it to cache. */ - folio = (struct folio *)alloc_pages_mpol(gfp_mask, 0, - mpol, ilx, numa_node_id()); + folio = folio_alloc_mpol(gfp_mask, 0, mpol, ilx, numa_node_id()); if (!folio) goto fail_put_swap;