diff options
Diffstat (limited to 'mm/mmap.c')
-rw-r--r-- | mm/mmap.c | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -452,12 +452,12 @@ static void vma_link(struct mm_struct *mm, struct vm_area_struct *vma, | |||
452 | spin_lock(&mapping->i_mmap_lock); | 452 | spin_lock(&mapping->i_mmap_lock); |
453 | vma->vm_truncate_count = mapping->truncate_count; | 453 | vma->vm_truncate_count = mapping->truncate_count; |
454 | } | 454 | } |
455 | anon_vma_lock(vma); | 455 | vma_lock_anon_vma(vma); |
456 | 456 | ||
457 | __vma_link(mm, vma, prev, rb_link, rb_parent); | 457 | __vma_link(mm, vma, prev, rb_link, rb_parent); |
458 | __vma_link_file(vma); | 458 | __vma_link_file(vma); |
459 | 459 | ||
460 | anon_vma_unlock(vma); | 460 | vma_unlock_anon_vma(vma); |
461 | if (mapping) | 461 | if (mapping) |
462 | spin_unlock(&mapping->i_mmap_lock); | 462 | spin_unlock(&mapping->i_mmap_lock); |
463 | 463 | ||
@@ -1710,7 +1710,7 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address) | |||
1710 | */ | 1710 | */ |
1711 | if (unlikely(anon_vma_prepare(vma))) | 1711 | if (unlikely(anon_vma_prepare(vma))) |
1712 | return -ENOMEM; | 1712 | return -ENOMEM; |
1713 | anon_vma_lock(vma); | 1713 | vma_lock_anon_vma(vma); |
1714 | 1714 | ||
1715 | /* | 1715 | /* |
1716 | * vma->vm_start/vm_end cannot change under us because the caller | 1716 | * vma->vm_start/vm_end cannot change under us because the caller |
@@ -1721,7 +1721,7 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address) | |||
1721 | if (address < PAGE_ALIGN(address+4)) | 1721 | if (address < PAGE_ALIGN(address+4)) |
1722 | address = PAGE_ALIGN(address+4); | 1722 | address = PAGE_ALIGN(address+4); |
1723 | else { | 1723 | else { |
1724 | anon_vma_unlock(vma); | 1724 | vma_unlock_anon_vma(vma); |
1725 | return -ENOMEM; | 1725 | return -ENOMEM; |
1726 | } | 1726 | } |
1727 | error = 0; | 1727 | error = 0; |
@@ -1739,7 +1739,7 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address) | |||
1739 | perf_event_mmap(vma); | 1739 | perf_event_mmap(vma); |
1740 | } | 1740 | } |
1741 | } | 1741 | } |
1742 | anon_vma_unlock(vma); | 1742 | vma_unlock_anon_vma(vma); |
1743 | return error; | 1743 | return error; |
1744 | } | 1744 | } |
1745 | #endif /* CONFIG_STACK_GROWSUP || CONFIG_IA64 */ | 1745 | #endif /* CONFIG_STACK_GROWSUP || CONFIG_IA64 */ |
@@ -1764,7 +1764,7 @@ static int expand_downwards(struct vm_area_struct *vma, | |||
1764 | if (error) | 1764 | if (error) |
1765 | return error; | 1765 | return error; |
1766 | 1766 | ||
1767 | anon_vma_lock(vma); | 1767 | vma_lock_anon_vma(vma); |
1768 | 1768 | ||
1769 | /* | 1769 | /* |
1770 | * vma->vm_start/vm_end cannot change under us because the caller | 1770 | * vma->vm_start/vm_end cannot change under us because the caller |
@@ -1786,7 +1786,7 @@ static int expand_downwards(struct vm_area_struct *vma, | |||
1786 | perf_event_mmap(vma); | 1786 | perf_event_mmap(vma); |
1787 | } | 1787 | } |
1788 | } | 1788 | } |
1789 | anon_vma_unlock(vma); | 1789 | vma_unlock_anon_vma(vma); |
1790 | return error; | 1790 | return error; |
1791 | } | 1791 | } |
1792 | 1792 | ||