[PATCH v7 14/17] mm: remove extra vma_numab_state_init() call

Suren Baghdasaryan posted 17 patches 1 year, 1 month ago
There is a newer version of this series
[PATCH v7 14/17] mm: remove extra vma_numab_state_init() call
Posted by Suren Baghdasaryan 1 year, 1 month ago
vma_init() already memset's the whole vm_area_struct to 0, so there is
no need to an additional vma_numab_state_init().

Signed-off-by: Suren Baghdasaryan <surenb@google.com>
---
 include/linux/mm.h | 1 -
 1 file changed, 1 deletion(-)

diff --git a/include/linux/mm.h b/include/linux/mm.h
index 99f4720d7e51..40bbe815df11 100644
--- a/include/linux/mm.h
+++ b/include/linux/mm.h
@@ -947,7 +947,6 @@ static inline void vma_init(struct vm_area_struct *vma, struct mm_struct *mm)
 	vma->vm_mm = mm;
 	vma->vm_ops = &vma_dummy_vm_ops;
 	INIT_LIST_HEAD(&vma->anon_vma_chain);
-	vma_numab_state_init(vma);
 	vma_lockdep_init(vma);
 	vma_init_lock(vma, false);
 }
-- 
2.47.1.613.gc27f4b7a9f-goog
Re: [PATCH v7 14/17] mm: remove extra vma_numab_state_init() call
Posted by Vlastimil Babka 1 year, 1 month ago
On 12/26/24 18:07, Suren Baghdasaryan wrote:
> vma_init() already memset's the whole vm_area_struct to 0, so there is
> no need to an additional vma_numab_state_init().
> 
> Signed-off-by: Suren Baghdasaryan <surenb@google.com>

Reviewed-by: Vlastimil Babka <vbabka@suse.cz>

> ---
>  include/linux/mm.h | 1 -
>  1 file changed, 1 deletion(-)
> 
> diff --git a/include/linux/mm.h b/include/linux/mm.h
> index 99f4720d7e51..40bbe815df11 100644
> --- a/include/linux/mm.h
> +++ b/include/linux/mm.h
> @@ -947,7 +947,6 @@ static inline void vma_init(struct vm_area_struct *vma, struct mm_struct *mm)
>  	vma->vm_mm = mm;
>  	vma->vm_ops = &vma_dummy_vm_ops;
>  	INIT_LIST_HEAD(&vma->anon_vma_chain);
> -	vma_numab_state_init(vma);
>  	vma_lockdep_init(vma);
>  	vma_init_lock(vma, false);
>  }