linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] mm/rmap: Correct obsolete comment of page_get_anon_vma()
@ 2021-02-03  9:32 Miaohe Lin
  2021-02-04 12:38 ` Matthew Wilcox
  0 siblings, 1 reply; 3+ messages in thread
From: Miaohe Lin @ 2021-02-03  9:32 UTC (permalink / raw)
  To: akpm; +Cc: linux-mm, linux-kernel, linmiaohe

Since commit 746b18d421da ("mm: use refcounts for page_lock_anon_vma()"),
page_lock_anon_vma() is renamed to page_get_anon_vma() and converted to
return a refcount increased anon_vma. But it forgot to change the relevant
comment.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 mm/rmap.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/mm/rmap.c b/mm/rmap.c
index b49e85605f8f..b0fc27e77d6d 100644
--- a/mm/rmap.c
+++ b/mm/rmap.c
@@ -462,8 +462,8 @@ void __init anon_vma_init(void)
  * Getting a lock on a stable anon_vma from a page off the LRU is tricky!
  *
  * Since there is no serialization what so ever against page_remove_rmap()
- * the best this function can do is return a locked anon_vma that might
- * have been relevant to this page.
+ * the best this function can do is return a refcount increased anon_vma
+ * that might have been relevant to this page.
  *
  * The page might have been remapped to a different anon_vma or the anon_vma
  * returned may already be freed (and even reused).
-- 
2.19.1



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

* Re: [PATCH] mm/rmap: Correct obsolete comment of page_get_anon_vma()
  2021-02-03  9:32 [PATCH] mm/rmap: Correct obsolete comment of page_get_anon_vma() Miaohe Lin
@ 2021-02-04 12:38 ` Matthew Wilcox
  2021-02-05  3:11   ` Miaohe Lin
  0 siblings, 1 reply; 3+ messages in thread
From: Matthew Wilcox @ 2021-02-04 12:38 UTC (permalink / raw)
  To: Miaohe Lin; +Cc: akpm, linux-mm, linux-kernel

On Wed, Feb 03, 2021 at 04:32:15AM -0500, Miaohe Lin wrote:
>   * Since there is no serialization what so ever against page_remove_rmap()
> - * the best this function can do is return a locked anon_vma that might
> - * have been relevant to this page.
> + * the best this function can do is return a refcount increased anon_vma
> + * that might have been relevant to this page.

Just s/a locked/an/
there's no need to mention again that the refcount
is increased.


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

* Re: [PATCH] mm/rmap: Correct obsolete comment of page_get_anon_vma()
  2021-02-04 12:38 ` Matthew Wilcox
@ 2021-02-05  3:11   ` Miaohe Lin
  0 siblings, 0 replies; 3+ messages in thread
From: Miaohe Lin @ 2021-02-05  3:11 UTC (permalink / raw)
  To: Matthew Wilcox; +Cc: akpm, linux-mm, linux-kernel

Hi:
On 2021/2/4 20:38, Matthew Wilcox wrote:
> On Wed, Feb 03, 2021 at 04:32:15AM -0500, Miaohe Lin wrote:
>>   * Since there is no serialization what so ever against page_remove_rmap()
>> - * the best this function can do is return a locked anon_vma that might
>> - * have been relevant to this page.
>> + * the best this function can do is return a refcount increased anon_vma
>> + * that might have been relevant to this page.
> 
> Just s/a locked/an/

Many thanks for your review and reply.

> there's no need to mention again that the refcount> is increased.

I think it's ok to mention again that the refcount is increased although I didn't find
out where this is first mentioned.
Thanks again.

> .
> 


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

end of thread, other threads:[~2021-02-05  3:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-03  9:32 [PATCH] mm/rmap: Correct obsolete comment of page_get_anon_vma() Miaohe Lin
2021-02-04 12:38 ` Matthew Wilcox
2021-02-05  3:11   ` Miaohe Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).