All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] filemap: remove obsolete comment in lock_page
@ 2022-04-02  6:22 Miaohe Lin
  2022-04-04 15:32 ` Matthew Wilcox
  0 siblings, 1 reply; 3+ messages in thread
From: Miaohe Lin @ 2022-04-02  6:22 UTC (permalink / raw)
  To: akpm
  Cc: willy, dhowells, william.kucharski, vbabka, kirill.shutemov,
	hannes, agruenba, linux-mm, linux-kernel, linmiaohe

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 <linmiaohe@huawei.com>
---
 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


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] filemap: remove obsolete comment in lock_page
  2022-04-02  6:22 [PATCH] filemap: remove obsolete comment in lock_page Miaohe Lin
@ 2022-04-04 15:32 ` Matthew Wilcox
  2022-04-06  2:39   ` Miaohe Lin
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Wilcox @ 2022-04-04 15:32 UTC (permalink / raw)
  To: Miaohe Lin
  Cc: akpm, dhowells, william.kucharski, vbabka, kirill.shutemov,
	hannes, agruenba, linux-mm, linux-kernel

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 <linmiaohe@huawei.com>

Thanks.  I'll fix up the changelog (some of the tenses are a little
strange) and take this through my pagecache tree.

>  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
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] filemap: remove obsolete comment in lock_page
  2022-04-04 15:32 ` Matthew Wilcox
@ 2022-04-06  2:39   ` Miaohe Lin
  0 siblings, 0 replies; 3+ messages in thread
From: Miaohe Lin @ 2022-04-06  2:39 UTC (permalink / raw)
  To: Matthew Wilcox
  Cc: akpm, dhowells, william.kucharski, vbabka, kirill.shutemov,
	hannes, agruenba, linux-mm, linux-kernel

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 <linmiaohe@huawei.com>
> 
> 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
>>
> 
> .
> 


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-04-06 13:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-02  6:22 [PATCH] filemap: remove obsolete comment in lock_page Miaohe Lin
2022-04-04 15:32 ` Matthew Wilcox
2022-04-06  2:39   ` Miaohe Lin

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.