aboutsummaryrefslogtreecommitdiffstats
path: root/mm/hugetlb.c
diff options
context:
space:
mode:
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r--mm/hugetlb.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c
index b8ce6f450956..5a16423a512c 100644
--- a/mm/hugetlb.c
+++ b/mm/hugetlb.c
@@ -532,7 +532,7 @@ static struct page *dequeue_huge_page_vma(struct hstate *h,
532 struct vm_area_struct *vma, 532 struct vm_area_struct *vma,
533 unsigned long address, int avoid_reserve) 533 unsigned long address, int avoid_reserve)
534{ 534{
535 struct page *page; 535 struct page *page = NULL;
536 struct mempolicy *mpol; 536 struct mempolicy *mpol;
537 nodemask_t *nodemask; 537 nodemask_t *nodemask;
538 struct zonelist *zonelist; 538 struct zonelist *zonelist;
@@ -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
2826out_mutex: 2828out_mutex:
2827 mutex_unlock(&hugetlb_instantiation_mutex); 2829 mutex_unlock(&hugetlb_instantiation_mutex);