mirror of https://github.com/torvalds/linux.git
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: Liam R. Howlett <Liam.Howlett@oracle.com> Reviewed-by: Suren Baghdasaryan <surenb@google.com> Signed-off-by: Vlastimil Babka <vbabka@suse.cz>
This commit is contained in:
parent
e3852a1213
commit
d09a61a3aa
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue