From patchwork Thu Jul 6 16:38:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sidhartha Kumar X-Patchwork-Id: 13304010 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 E81B4EB64DD for ; Thu, 6 Jul 2023 16:39:46 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 7E6A98D0006; Thu, 6 Jul 2023 12:39:46 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 796B98D0001; Thu, 6 Jul 2023 12:39:46 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5E9178D0006; Thu, 6 Jul 2023 12:39:46 -0400 (EDT) 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 4FC1B8D0001 for ; Thu, 6 Jul 2023 12:39:46 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay03.hostedemail.com (Postfix) with ESMTP id 0F6AEA043F for ; Thu, 6 Jul 2023 16:39:46 +0000 (UTC) X-FDA: 80981748372.18.E573F57 Received: from mx0b-00069f02.pphosted.com (mx0b-00069f02.pphosted.com [205.220.177.32]) by imf19.hostedemail.com (Postfix) with ESMTP id 4BF061A0004 for ; Thu, 6 Jul 2023 16:39:42 +0000 (UTC) Authentication-Results: imf19.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=eXxZ5D1l; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Ht+KNam4; spf=pass (imf19.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=sidhartha.kumar@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1688661582; 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:dkim-signature; bh=AlepPsPN5ijLtdW0fpaVmyRQE1pVyexGYLHqAumPIOE=; b=rTRGoGT/bqCvkYor0BONn0yHz9JtH4GDu70CXpP71krg99EOQrZHCJJPsd6oALJ0klq8Iz jXHHoWNg76uNxzQkFok/0ocXhqRycW4KTq2puf/djrUDZ+xKnzr0aD3geRHuJH+J3PX237 ln0vHy5zWsBuQpK7PVmq8k0a+FtfJg4= ARC-Seal: i=2; s=arc-20220608; d=hostedemail.com; t=1688661582; a=rsa-sha256; cv=pass; b=cZUlVw1Yh1yww4BSMIQa4BwNltwGI28XC3kulDpVy3iDFg+AEpdk3C9Gqn8cEvRuJNKI4O 55k+DqYKZ2gWMA53MEtouGj3wCGUskcbb0qBKn9yAYZ0/GU9rksDDchSEyZJShkAL7LzEC hrl49jViTiJWRJ4oF+/V7iT8V9ufH/A= ARC-Authentication-Results: i=2; imf19.hostedemail.com; dkim=pass header.d=oracle.com header.s=corp-2023-03-30 header.b=eXxZ5D1l; dkim=pass header.d=oracle.onmicrosoft.com header.s=selector2-oracle-onmicrosoft-com header.b=Ht+KNam4; spf=pass (imf19.hostedemail.com: domain of sidhartha.kumar@oracle.com designates 205.220.177.32 as permitted sender) smtp.mailfrom=sidhartha.kumar@oracle.com; dmarc=pass (policy=none) header.from=oracle.com; arc=pass ("microsoft.com:s=arcselector9901:i=1") Received: from pps.filterd (m0246631.ppops.net [127.0.0.1]) by mx0b-00069f02.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 366FwvbX014223; Thu, 6 Jul 2023 16:39:32 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.com; h=from : to : cc : subject : date : message-id : in-reply-to : references : content-transfer-encoding : content-type : mime-version; s=corp-2023-03-30; bh=AlepPsPN5ijLtdW0fpaVmyRQE1pVyexGYLHqAumPIOE=; b=eXxZ5D1l3WBlP4Dl5ds0s1Ze48perpl/Lnzlv2WefTBihD+qPloukkWK8g9DQ3pO3cgd yHvO2D/Pouxb7BTwrAJu5d/cn7ItGpU2WTmZB6Pl9GWB/lrqM6RRgnEFKvEC1gXJwiYM nG1szY3+bLD0GZh2Y9e/fQh7BX9RM7arfjkn0wdPoj9bdnZYrS+HOA2tDhQ6M54PicvZ VKR2xYp7+RH+mqGpAt24d7E8BZNDkcrjeTE3Ohi42dceyRCPAVCa7ZCKU+7eqD4cJEO5 jQVylJeUvjc5pvXycAeH6kVgienPM9b2F9lz04AHLSFWGn2OKioVUTB/Iyj8n3DurVpq iQ== Received: from iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (iadpaimrmta03.appoci.oracle.com [130.35.103.27]) by mx0b-00069f02.pphosted.com (PPS) with ESMTPS id 3rp0nw03pe-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 06 Jul 2023 16:39:31 +0000 Received: from pps.filterd (iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com [127.0.0.1]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (8.17.1.19/8.17.1.19) with ESMTP id 366GXnsM013569; Thu, 6 Jul 2023 16:39:31 GMT Received: from nam11-co1-obe.outbound.protection.outlook.com (mail-co1nam11lp2177.outbound.protection.outlook.com [104.47.56.177]) by iadpaimrmta03.imrmtpd1.prodappiadaev1.oraclevcn.com (PPS) with ESMTPS id 3rjak7av8n-2 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 06 Jul 2023 16:39:31 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iRiRLsfcgNsP+kOPhJrNfgztBvqokBeqLK3aQpZCBMGlORdMc65gTwK3ESLSKepYcXBIR6d9++Lpwh0vhaU25Vwr8GJkeuDzkhnFhboI4Pj75INFQmVpMmXwqK/tH332ABN9J0A+2C3Q5We9mTD0s/6UArDQjAM+qvjjJ9c6sbL0/UWabRXb/g7nRauBNkaX+LPv5UQaSfl7OE0YYEX8pKwV1oF1mzSN4N9Ha4zijI+uNbX2jFAVWrni9y0IIqCWHVJFN9Q/vr9UGjYBtI6vxWNMQaR5zbCLuZ8573wHzeQyoYpWiruXINIVlDbMvFJZeu9hJF/tgSNTZ+hdK9jgLQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=AlepPsPN5ijLtdW0fpaVmyRQE1pVyexGYLHqAumPIOE=; b=Jm+UzkcUi09fuiD05EWcJ8PNoDTNG/r73OY1JkZ4hs85hQfiS9kQpts76KyRnq9VeK0K1n2YZkPD8lL01NQQEC2vAE4K96uypDdcOvEmMPWhQUNlW5aXRGDiVvCw4wpFb2beKc96SDH0Z13/7ycpqRROWb7kbR6temAwUvb3bXCyJeV+8XHT8B2b/2W1OoGV/C1R0QM3I2o+5kERW/e4cN9XvzMGonQPvQ61t6nhrbPjBUdYeytapy6FgfME9HmTfjf+YHo4P1fMuA97UhcB8LFeV1Jk/XNe9ZJ1HH4j5Fc7LCmm1t166VA3P0IuF5azR3veIy2Fj8anaGjOUZhjMg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oracle.com; dmarc=pass action=none header.from=oracle.com; dkim=pass header.d=oracle.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=oracle.onmicrosoft.com; s=selector2-oracle-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=AlepPsPN5ijLtdW0fpaVmyRQE1pVyexGYLHqAumPIOE=; b=Ht+KNam4g8GigvDwFocpwmPfh1MqS8IjxFNgMQ1XBrnA7D3dmB5ippeDYi60uqpgqs2tihD7qU5Zy0AcgzLn9x6okhFoF9/WbadTNehc5zoCkNouZmHtxeJmcqc9tY3OvQtHwt1mJiMXC2MMqpCSCY0YSQ9ba47WyY6JZiHNFbA= Received: from CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) by CH0PR10MB4955.namprd10.prod.outlook.com (2603:10b6:610:c2::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6565.24; Thu, 6 Jul 2023 16:39:02 +0000 Received: from CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::d9c0:689a:147b:ced5]) by CH0PR10MB5113.namprd10.prod.outlook.com ([fe80::d9c0:689a:147b:ced5%5]) with mapi id 15.20.6565.019; Thu, 6 Jul 2023 16:39:01 +0000 From: Sidhartha Kumar To: linux-kernel@vger.kernel.org, linux-mm@kvack.org Cc: akpm@linux-foundation.org, willy@infradead.org, zhangpeng362@huawei.com, Sidhartha Kumar Subject: [PATCH v3 4/4] mm/memory: convert do_read_fault() to use folios Date: Thu, 6 Jul 2023 09:38:47 -0700 Message-ID: <20230706163847.403202-4-sidhartha.kumar@oracle.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: <20230706163847.403202-1-sidhartha.kumar@oracle.com> References: <20230706163847.403202-1-sidhartha.kumar@oracle.com> X-ClientProxiedBy: BYAPR08CA0034.namprd08.prod.outlook.com (2603:10b6:a03:100::47) To CH0PR10MB5113.namprd10.prod.outlook.com (2603:10b6:610:c9::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH0PR10MB5113:EE_|CH0PR10MB4955:EE_ X-MS-Office365-Filtering-Correlation-Id: 16cee2d7-5b92-458a-39ed-08db7e3f810e X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Fr94jec+W3V9sy51ms8Jn0EydXjfCFtOse7ljYxIuQT/1lsqvHKTJKjfGnubnbqsD9bnvM9XkGUVBdeE4zjm8Lde3gWfvj5t/ASvIqe7Hs0DJKAjE2nlkanvGnDh5Fh+xn69L4fWn43NCUxDpfxEz3i9SghNjnrMUZxQfLdcGhs7wbVkxWJThmAdaWE3AFD5lJkCHQr2TTKn/Gb5CEL5/j25fP/cfRDAJZC/yiil176UB4OIWWvVu5w9++iKE0xwvq0/SGwSOyfaqJWNNUzuyIJInTi+cAvrxQWIFXkpI464jROUTrnqcSiGKmtzcfua9aB350WhUokdNLvUZhPG0B2AQ13LyAt/B1d3V7bPn+1K1/JPjPwnbCGO9sUMhSYSQj9TXn1rmL+SRvrDAuRyFGzSc61W1Yzin1VbEiJmgS5XAO39bH31mB9JCU0x7nmpeX4sL60d04fy5PG8c03JgiD75oyRxcrj4Jo9WguxskTVdswpAG9ODY/kNAntw3CKEmdYwZTLTJHXaXvztBkUNKnkdr+cBfd2eWbBCFh69MYto/pfU5r7620ZKx/VFC8Y X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:CH0PR10MB5113.namprd10.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(136003)(39860400002)(396003)(346002)(376002)(366004)(451199021)(5660300002)(44832011)(66476007)(66556008)(66946007)(38100700002)(4326008)(41300700001)(8936002)(316002)(8676002)(86362001)(36756003)(2906002)(6666004)(6486002)(83380400001)(107886003)(6506007)(1076003)(186003)(6512007)(2616005)(478600001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: tS5tCeXh2zmHlqpRYebjo/+X42pRxi+ozHV1vkaaIv75AdDNtOScfv8SC3yBsp9FJplzDNlwExdsFjCApOU2Fz0xJW64tyDFb1NY5/HZN3Rn6WtkIl1uJcvyB9EsSOLxZRSzViY/3iUTWITv3ZSd/HvaJWHi02qh2I4rteNoMRVH/EnGUbX5atcoY7T9VBVk8nGBkLLxLQaF8zKujRxNCYzWeBN7Ta76AkJtInuhCM1KhwkLGJc3nxOFFGYFOTcM20esLtNCVXIV8+tj4xCN2NQHjtcluNIbqcYKVapgkPfen8A/gNupAddyqZU4LrxN9OMJHCYuOHhZHo8+Ei9IkmQ96Rik0vr65cBnPPBsyjj963RtgkRQNtDfliOQTDz62rhFhbsduavMfxs+dVnRN7mhfNG3vWb4WuyyoQf11ZC3zPn0LyrYOIkKBiz1+qOvObB1r8gcGDVH5QQZwssQMNbDGbE3iPmEAwFszV+xNJm6gPEWVeSjkIN+jpuGZE8Y9Hn3Iqm9Rwi+kAeo7wncBLE4P7nlna5oKuK/UL86awVlRbWbTtAxUX70YkU1RhyUFT/ncGvTeJthUDbhJMahFeTDgaSdbHg5nGxMADjKst0der3RCissffowinWWY91GXEeYa240kgdZTRU6kinfa3yh+3OesBf1A2iEFEm+YbzIxfFWK45QXyb/cNouxpHE4gHChhik6fBzMVvJOWLaW/qFnEXjivTzULLewWEcXoteEUtCkqKqtGsax/SFgo/TPg4UMuMpOMZdNpWEIFvyViSRj0bISi/Fe6BegTuiSPKREEoGShowdS1mnQb1dcPw8haGaYqtuqcIbPls4ioMXMx7sGK6ZaGp8VRAxAZDYctWYhkGq9UlxLqQM3jTDtt97oQLKXowlWs7atnS9JU2TbWRsgQ89sdvpeamZnKBEhkgTNAXt08kAbBtguOB63jqEd2O32rLXll447hcF2dp4J3qwwB/NJUpD7+qXYR1s2hDbp/xwGwYPFAVxLHxDlAKLEx2Y4kljqvpAxC2N/wU8Y0xcnE2SYfctEa7gyRLFbs/yi41pIwBnGeEMUbNwCUtNUBxXZZsd0AKIdsNj4ou++BmLIXcSyokmM4eN0mUnsTQqKrioHosrQGN9osXgR61c/In6HgEAKojuFBlFXidWL8+GazOJR6X2iUA/lBe1wTtKETmgbgAfWQiCTvhumVC3rAF25emjp6NUuDnWNeeYknBVZOmvHG6hrd+24+DJLWPIMNuleTE5N8NgsdHDPSYwE0pyt+5rQK5Uk2MDFYcryAs78ajq+QrLPIAaJASYNlHbwUfYxtrm5eOjs58X3EDmpj9yNlv4Wmx8Z2+u1bS4Ae9/BXA8T6RqJEZb8F/Iv4kyBIkVp8788BIzLxOopWMqC5Ex+6/3NuGYxM6+8dslk7nIRtbnFolN5W7dYZCwwCoFUkHuUrOjcGocSpQjj+rgsu6yl7FFS52wuwmk6SmUB9gPg+ohzWLEAKPvhW/PI2osQec0Y7HQnOXG2nGbxcxTBvv0YYyTedSe5Uhga0A9f1JiI6utLlYOfwGsA+x2o6zOQEdUsted0NCMloQKMktyQ8PBBtdlsTOFclx8UGMTKB1WvYNjmGTkVEA8vk/fU0= X-MS-Exchange-AntiSpam-ExternalHop-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-ExternalHop-MessageData-0: gpSacCMJq7p7Ik121LRWehy5OIMzpgcvaCRqNLLwHiNXuNFOyhUNHFlBkfKKYjRJ3ovpMTzO61Ug50pCKTPkhUStMJf2caDaAa2T2p95J0ANTTEqQBR3eQTl42K/S177ANaGB0WQpfNpA5lDbvaP0F9vsJeWEYpjLklEynfVxv/ZofybB8lO0DXUK6LDn3e2Uv/yx8SfdcGKKB8IItSana5qKjGmbyTqG3+XictCtl58uYgqSQX8gsAwX2JWfA/nDLOPSJ8OFBqWlByueaK7CJVrREfmZ7J8a5whtzW8c3nGUVw1r71QbuaTDoFD/qhYsnRiLPOHBTCQEH49vDCsjbJ5RKoBm4ysACA0J6atfQISG0WvbZI1ifO03hZ5+SNrr/DbjLEAJJn799CmW5NnNONvULnnmL2oOqwldW4lafddI95NrJWk36A8MEJU7xA2dyNnYm9OwZp0pmzuGKQfhiwC+PhWPSe4Y/U4L9kHJTfQIlgLYFGJ1hfgaPNDKKqj0kotlc+zPmjKT9mW9ULCo8X8tpU94GNlukDtG8MpwaRnNnlwR+HlLNrJaI1jIKFrZadjjdfI25r8MTO0c/wl4YSFu7EPCCxPgL94jcgFS9h7O2PeTTuU//Nd18MqV4HGcDJjO/nAo1oJ4xhjivgQE4GN03KQD37f59Q71NBJ/AK4Ozz0xIpVpJckITh7Bb2PmpPTYrhI+noJgNPjDaR7xRquXf9RToDQys3UO2myRWbdEZDHdTlAZrtP4FkXjmPWTogvzGURiN/PwxjhwlQwISxkItSrroNXd2aNuPziF1MMhoo3SocU1ygFPI7eH6ZURgKmmdPqDL7yka0icEfd+6DdFJqEX4O/KOEB7NBtDhYYfCzfYEE29HitPHl3sGIljwjwEtopnPf+jzwKeAyIuA== X-OriginatorOrg: oracle.com X-MS-Exchange-CrossTenant-Network-Message-Id: 16cee2d7-5b92-458a-39ed-08db7e3f810e X-MS-Exchange-CrossTenant-AuthSource: CH0PR10MB5113.namprd10.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jul 2023 16:39:01.7615 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 4e2c6054-71cb-48f1-bd6c-3a9705aca71b X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: Uia3hf0jRoy6uv2pNR5UgpJl6oB3T0GgaUtJ1cqZR1SxifrgttnVMzStNGxM1xHFcPsX1pOhEhztDspNJtz7gZznvFGbFZmy7xYBdtIEaZU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH0PR10MB4955 X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.957,Hydra:6.0.591,FMLib:17.11.176.26 definitions=2023-07-06_11,2023-07-06_02,2023-05-22_02 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 phishscore=0 bulkscore=0 malwarescore=0 mlxlogscore=999 adultscore=0 spamscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2305260000 definitions=main-2307060150 X-Proofpoint-ORIG-GUID: v7EttGctZifglOwKhdnpVggBVL0lpqLG X-Proofpoint-GUID: v7EttGctZifglOwKhdnpVggBVL0lpqLG X-Rspamd-Queue-Id: 4BF061A0004 X-Rspam-User: X-Rspamd-Server: rspam11 X-Stat-Signature: cxyth53t4is9zs6whpuwfbmbdb5kki71 X-HE-Tag: 1688661582-285499 X-HE-Meta: U2FsdGVkX19X2lY7E/rztdLqAMBciFiOfHYHJHcsbImecrmkNS6i2PkI5LZkRuDSrwcDDbVHsMsGGiy1FHn5ITjjrLG3OkYkf63oa4L7tHGgfzWA5LDUImAccUDYISw+TWUL4kEnSq/MghUJf5HhfzanMjw+VdXqMFuigwiEnNZlc8PjLoB9rKvn+QpReOOZvYxB/qM6k1cBP/N06gxoV9PUtsK/5pPLcSvAWBlP2CmttSG+lgt7RfGeC4FmaJxpJ14lK+8dQevy7iF7UIuprARrBixUaBh6Go64iKRTQIV/BzcSKmIExAWnv6tYD2UdMm0Qfd7NMCNgGDIWYa7qPUZHyxzUby9H86LUKDmymuUAluq+zvcxmHKSStsm+JRc5SrJGaM50EA0FHgHkYFcSWrejEsAWJKLUfM9Hl4NKJm2ZI4lBn3pX+5x2AU5vvTnZjeEGLc2HTTsFNDq2P5WieSsiQkI1aLtWgyxjB/xFoLVlPC4ZPhYSY/fbW8igToAHjaeZFVYK2Rljsldtuy5EAuIE8+Vyza9ijUHEo4ZwFbYE6oJQA25N9QUGZkQdXyjJrbysz2sIKsdr0/D00F5tqOfqnbtrsIX0OBy0oTe2lqX+nzAB7PYm/wXpiy0UinLquszFCnaQeBQEe+9w/yujeqPOJWtj9z9b+GwKO5Bq0SJvygEqMk680nmSb4TipNlL4n02vxFtr1GZuSSsCjC4B1X9J8guRcgvgyGefhsAkrRwfJMiAnMPippPeD91hiCuE2dGHMFS0YVgU43jlX0x+f2gwlEeYEGqtSf8Vw5WQ5mqKCewtVdseI4cbVctLiAYde/+7ngw9Aqh5vdhJgl4SfXp8eHnNmHvVmKklBSTnVWT04q1msWT+g0fLD27nqyRw6Bx2CUnUtvwH55VDO+XCcCvVEFAklW6qRw78TZuaMwPgJZYQ6q9OyneVqtDKkq2LoaAbDSj/t6xUmec4P LjTTzde4 pBgbMyzb4zcJbSAJOEkPv9XZHkuazou1dV7Kl0Cxk94YkVCchneVknx/P58CH0JA0NP44k2Tl+akMVSY159+fcBCYUJwgHDBpaEqQ5H1d0+RnEt34yzsGGAd/JN2MxvgAyTg0b48o3xM9hwBS1708yzsh0/wwwV6/tPW6pdCHSDq/ifRqYsyxVP+It+vQ9HAvW1PEe2QrVs03ryYKuduHfQQ57j+XvYJVckTGgq2n9pBP0uqIq8LTUTkwPuqqFtr50ZDg3ymTQshzAH/HfIGI+ATHI+vM5ujtArKsusCiMF+uANIA4VMrAPTPEVBrOwSCiwJamMQPFKMNz+CAto6aycCAT15fl3XR1iUXhso182pR7YBUVfBfWVsbC5bbp9KzwcjxbRtXNlisqBuDpgmaqxPH11cBAXwFaT36TxFDGjv6hIh3CNJNKC5vDn/OjaJ2gDEk8f2lC5q65T0F0cN9/6FSYAB/ZCRuBfaUL4QLBuG76O0= 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: Saves one implicit call to compound_head() Signed-off-by: Sidhartha Kumar Reviewed-by: Matthew Wilcox (Oracle) Reviewed-by: ZhangPeng --- v3: - move folio initialization after finish_fault() v2 - move folio initialization after __do_fault() mm/memory.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/mm/memory.c b/mm/memory.c index a59b10e534c07..64e1eb840dec7 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -4541,6 +4541,7 @@ static inline bool should_fault_around(struct vm_fault *vmf) static vm_fault_t do_read_fault(struct vm_fault *vmf) { vm_fault_t ret = 0; + struct folio *folio; /* * Let's call ->map_pages() first and use ->fault() as fallback @@ -4558,9 +4559,10 @@ static vm_fault_t do_read_fault(struct vm_fault *vmf) return ret; ret |= finish_fault(vmf); - unlock_page(vmf->page); + folio = page_folio(vmf->page); + folio_unlock(folio); if (unlikely(ret & (VM_FAULT_ERROR | VM_FAULT_NOPAGE | VM_FAULT_RETRY))) - put_page(vmf->page); + folio_put(folio); return ret; }