diff options
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r-- | mm/hugetlb.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index b8ce6f450956..cd65cb19c941 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -2791,6 +2791,7 @@ int hugetlb_fault(struct mm_struct *mm, struct vm_area_struct *vma, | |||
2791 | * so no worry about deadlock. | 2791 | * so no worry about deadlock. |
2792 | */ | 2792 | */ |
2793 | page = pte_page(entry); | 2793 | page = pte_page(entry); |
2794 | get_page(page); | ||
2794 | if (page != pagecache_page) | 2795 | if (page != pagecache_page) |
2795 | lock_page(page); | 2796 | lock_page(page); |
2796 | 2797 | ||
@@ -2822,6 +2823,7 @@ out_page_table_lock: | |||
2822 | } | 2823 | } |
2823 | if (page != pagecache_page) | 2824 | if (page != pagecache_page) |
2824 | unlock_page(page); | 2825 | unlock_page(page); |
2826 | put_page(page); | ||
2825 | 2827 | ||
2826 | out_mutex: | 2828 | out_mutex: |
2827 | mutex_unlock(&hugetlb_instantiation_mutex); | 2829 | mutex_unlock(&hugetlb_instantiation_mutex); |