Commit d09a61a3 authored by Liam R. Howlett's avatar Liam R. Howlett Committed by Vlastimil Babka
Browse files

tools/testing/vma: Implement vm_refcnt reset



Add the reset of the ref count in vma_lock_init().  This is needed if
the vma memory is not zeroed on allocation.

Signed-off-by: default avatarLiam R. Howlett <Liam.Howlett@oracle.com>
Reviewed-by: default avatarSuren Baghdasaryan <surenb@google.com>
Signed-off-by: default avatarVlastimil Babka <vbabka@suse.cz>
parent e3852a12
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1373,6 +1373,8 @@ static inline void ksm_exit(struct mm_struct *mm)

static inline void vma_lock_init(struct vm_area_struct *vma, bool reset_refcnt)
{
	if (reset_refcnt)
		refcount_set(&vma->vm_refcnt, 0);
}

static inline void vma_numab_state_init(struct vm_area_struct *vma)