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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 57FC2C433EF for ; Wed, 6 Apr 2022 13:08:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232635AbiDFNKr (ORCPT ); Wed, 6 Apr 2022 09:10:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34524 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232648AbiDFNKO (ORCPT ); Wed, 6 Apr 2022 09:10:14 -0400 Received: from szxga01-in.huawei.com (szxga01-in.huawei.com [45.249.212.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1FDE2BFC1B for ; Tue, 5 Apr 2022 19:39:55 -0700 (PDT) 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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 >> > > . >