From: "Liam R. Howlett" <Liam.Howlett@xxxxxxxxxx> Switch the order of the checking. Signed-off-by: Liam R. Howlett <Liam.Howlett@xxxxxxxxxx> --- mm/vma.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) Please squash this into 06/21. diff --git a/mm/vma.c b/mm/vma.c index 58604fe3bd03..b0c481d08612 100644 --- a/mm/vma.c +++ b/mm/vma.c @@ -719,13 +719,13 @@ static void vms_complete_munmap_vmas(struct vma_munmap_struct *vms, update_hiwater_vm(mm); /* Stat accounting */ WRITE_ONCE(mm->total_vm, READ_ONCE(mm->total_vm) - vms->nr_pages); - mm->exec_vm -= vms->exec_vm; - mm->stack_vm -= vms->stack_vm; - mm->data_vm -= vms->data_vm; /* Paranoid bookkeeping */ VM_WARN_ON(vms->exec_vm > mm->exec_vm); VM_WARN_ON(vms->stack_vm > mm->stack_vm); VM_WARN_ON(vms->data_vm > mm->data_vm); + mm->exec_vm -= vms->exec_vm; + mm->stack_vm -= vms->stack_vm; + mm->data_vm -= vms->data_vm; /* Remove and clean up vmas */ mas_set(mas_detach, 0); -- 2.43.0