/* release all the mappings made in a process's VM space  */
void exit_mmap(struct mm_struct *mm)
/* release all the mappings made in a process's VM space  */
void exit_mmap(struct mm_struct *mm)
{
	struct vm_area_struct *vma;
	if (!mm)
		return;
	kenter("");
	mm->total_vm = 0;
	while ((vma = mm->mmap)) {
		mm->mmap = vma->vm_next;
		delete_vma_from_mm(vma);
		delete_vma(mm, vma);
	}
	kleave("");
}