From mboxrd@z Thu Jan 1 00:00:00 1970 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 367BFC433EF for ; Wed, 6 Apr 2022 02:40:18 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id B9A736B0073; Tue, 5 Apr 2022 22:40:07 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id B4A088D0002; Tue, 5 Apr 2022 22:40:07 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id A39048D0001; Tue, 5 Apr 2022 22:40:07 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (relay.hostedemail.com [64.99.140.25]) by kanga.kvack.org (Postfix) with ESMTP id 9477B6B0073 for ; Tue, 5 Apr 2022 22:40:07 -0400 (EDT) Received: from smtpin16.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay07.hostedemail.com (Postfix) with ESMTP id 6162D20E0C for ; Wed, 6 Apr 2022 02:39:57 +0000 (UTC) X-FDA: 79324899234.16.A750FA9 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by imf21.hostedemail.com (Postfix) with ESMTP id 96D721C001F for ; Wed, 6 Apr 2022 02:39:56 +0000 (UTC) Received: from canpemm500002.china.huawei.com (unknown [172.30.72.55]) by szxga01-in.huawei.com (SkyGuard) with ESMTP id 4KY7y7322fzdZTR; Wed, 6 Apr 2022 10:39:27 +0800 (CST) Received: from [10.174.177.76] (10.174.177.76) 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.2375.24; Wed, 6 Apr 2022 10:39:53 +0800 Subject: Re: [PATCH] filemap: remove obsolete comment in lock_page To: Matthew Wilcox CC: , , , , , , , , References: <20220402062218.30709-1-linmiaohe@huawei.com> From: Miaohe Lin Message-ID: Date: Wed, 6 Apr 2022 10:39:53 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.174.177.76] X-ClientProxiedBy: dggems703-chm.china.huawei.com (10.3.19.180) To canpemm500002.china.huawei.com (7.192.104.244) X-CFilter-Loop: Reflected X-Rspamd-Server: rspam04 X-Rspamd-Queue-Id: 96D721C001F X-Stat-Signature: ee59gxqhym417xqt5zwxejtkhdn1wka9 Authentication-Results: imf21.hostedemail.com; dkim=none; spf=pass (imf21.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 X-Rspam-User: X-HE-Tag: 1649212796-161151 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: On 2022/4/4 23:32, Matthew Wilcox wrote: > On Sat, Apr 02, 2022 at 02:22:18PM +0800, Miaohe Lin wrote: >> lock_page needs the caller to have a reference on the page->mapping inode >> due to sync_page. Also lock_page_nosync is introduced which does not do a >> sync_page via commit db37648cd6ce ("[PATCH] mm: non syncing lock_page()"). >> But commit 7eaceaccab5f ("block: remove per-queue plugging") kills off the >> old plugging along with aops->sync_page() and lock_page_nosync. So there >> is no need to have a reference on the page->mapping inode when calling >> lock_page anymore. Remove this obsolete and confusing comment. >> >> Signed-off-by: Miaohe Lin > > Thanks. I'll fix up the changelog (some of the tenses are a little > strange) and take this through my pagecache tree. Many thanks for doing this. :) > >> include/linux/pagemap.h | 3 --- >> 1 file changed, 3 deletions(-) >> >> diff --git a/include/linux/pagemap.h b/include/linux/pagemap.h >> index 993994cd943a..8dfe8e49c427 100644 >> --- a/include/linux/pagemap.h >> +++ b/include/linux/pagemap.h >> @@ -908,9 +908,6 @@ static inline void folio_lock(struct folio *folio) >> __folio_lock(folio); >> } >> >> -/* >> - * lock_page may only be called if we have the page's inode pinned. >> - */ >> static inline void lock_page(struct page *page) >> { >> struct folio *folio; >> -- >> 2.23.0 >> > > . >