Lines Matching refs:vma
439 static bool vma_lock_alloc(struct vm_area_struct *vma)
441 vma->vm_lock = kmem_cache_alloc(vma_lock_cachep, GFP_KERNEL);
442 if (!vma->vm_lock)
445 init_rwsem(&vma->vm_lock->lock);
446 vma->vm_lock_seq = -1;
451 static inline void vma_lock_free(struct vm_area_struct *vma)
453 kmem_cache_free(vma_lock_cachep, vma->vm_lock);
458 static inline bool vma_lock_alloc(struct vm_area_struct *vma) { return true; }
459 static inline void vma_lock_free(struct vm_area_struct *vma) {}
465 struct vm_area_struct *vma;
467 vma = kmem_cache_alloc(vm_area_cachep, GFP_KERNEL);
468 if (!vma)
471 vma_init(vma, mm);
472 if (!vma_lock_alloc(vma)) {
473 kmem_cache_free(vm_area_cachep, vma);
477 return vma;
505 void __vm_area_free(struct vm_area_struct *vma)
507 vma_numab_state_free(vma);
508 free_anon_vma_name(vma);
509 vma_lock_free(vma);
510 kmem_cache_free(vm_area_cachep, vma);
516 struct vm_area_struct *vma = container_of(head, struct vm_area_struct,
519 /* The vma should not be locked while being destroyed. */
520 VM_BUG_ON_VMA(rwsem_is_locked(&vma->vm_lock->lock), vma);
521 __vm_area_free(vma);
525 void vm_area_free(struct vm_area_struct *vma)
528 call_rcu(&vma->vm_rcu, vm_area_free_rcu_cb);
530 __vm_area_free(vma);
711 * copy page for current vma.
718 * Copy/update hugetlb private vma information.
724 * Link the vma into the MT. After using __mt_dup(), memory
1443 struct vm_area_struct *vma;
1452 for_each_vma(vmi, vma) {
1453 if (!vma->vm_file)
1455 if (path_equal(&vma->vm_file->f_path,