[PATCH 09/13] mm/memory-failure: remove obsolete comment in unpoison_memory()

Miaohe Lin posted 13 patches 1 year, 8 months ago
There is a newer version of this series
[PATCH 09/13] mm/memory-failure: remove obsolete comment in unpoison_memory()
Posted by Miaohe Lin 1 year, 8 months ago
Since commit 130d4df57390 ("mm/sl[au]b: rearrange struct slab fields to
allow larger rcu_head"), folio->_mapcount is not overloaded with SLAB.
Update corresponding comment.

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

diff --git a/mm/memory-failure.c b/mm/memory-failure.c
index 19d338e83e43..e4252f297d41 100644
--- a/mm/memory-failure.c
+++ b/mm/memory-failure.c
@@ -2610,10 +2610,6 @@ int unpoison_memory(unsigned long pfn)
 	    folio_test_reserved(folio) || folio_test_offline(folio))
 		goto unlock_mutex;
 
-	/*
-	 * Note that folio->_mapcount is overloaded in SLAB, so the simple test
-	 * in folio_mapped() has to be done after folio_test_slab() is checked.
-	 */
 	if (folio_mapped(folio)) {
 		unpoison_pr_info("Unpoison: Someone maps the hwpoison page %#lx\n",
 				 pfn, &unpoison_rs);
-- 
2.33.0
Re: [PATCH 09/13] mm/memory-failure: remove obsolete comment in unpoison_memory()
Posted by David Hildenbrand 1 year, 8 months ago
On 24.05.24 11:13, Miaohe Lin wrote:
> Since commit 130d4df57390 ("mm/sl[au]b: rearrange struct slab fields to
> allow larger rcu_head"), folio->_mapcount is not overloaded with SLAB.
> Update corresponding comment.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> ---
>   mm/memory-failure.c | 4 ----
>   1 file changed, 4 deletions(-)
> 
> diff --git a/mm/memory-failure.c b/mm/memory-failure.c
> index 19d338e83e43..e4252f297d41 100644
> --- a/mm/memory-failure.c
> +++ b/mm/memory-failure.c
> @@ -2610,10 +2610,6 @@ int unpoison_memory(unsigned long pfn)
>   	    folio_test_reserved(folio) || folio_test_offline(folio))
>   		goto unlock_mutex;
>   
> -	/*
> -	 * Note that folio->_mapcount is overloaded in SLAB, so the simple test
> -	 * in folio_mapped() has to be done after folio_test_slab() is checked.
> -	 */
>   	if (folio_mapped(folio)) {
>   		unpoison_pr_info("Unpoison: Someone maps the hwpoison page %#lx\n",
>   				 pfn, &unpoison_rs);

Reviewed-by: David Hildenbrand <david@redhat.com>

-- 
Cheers,

David / dhildenb