/* Unlink a file-based vm structure from its prio_tree, to hide vma from rmap and vmtruncate before freeing its page tables.  */
void unlink_file_vma(struct vm_area_struct *vma)
/* Unlink a file-based vm structure from its prio_tree, to hide vma from rmap and vmtruncate before freeing its page tables.  */
void unlink_file_vma(struct vm_area_struct *vma)
{
	struct file *file = vma->vm_file;
	if (file) {
		struct address_space *mapping = file->f_mapping;
		spin_lock(&mapping->i_mmap_lock);
		__remove_shared_vm_struct(vma, file, mapping);
		spin_unlock(&mapping->i_mmap_lock);
	}
}