diff options
Diffstat (limited to 'mm/hugetlb.c')
-rw-r--r-- | mm/hugetlb.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 089092d152ab..cb362f761f17 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c | |||
@@ -44,14 +44,14 @@ static void clear_huge_page(struct page *page, unsigned long addr) | |||
44 | } | 44 | } |
45 | 45 | ||
46 | static void copy_huge_page(struct page *dst, struct page *src, | 46 | static void copy_huge_page(struct page *dst, struct page *src, |
47 | unsigned long addr) | 47 | unsigned long addr, struct vm_area_struct *vma) |
48 | { | 48 | { |
49 | int i; | 49 | int i; |
50 | 50 | ||
51 | might_sleep(); | 51 | might_sleep(); |
52 | for (i = 0; i < HPAGE_SIZE/PAGE_SIZE; i++) { | 52 | for (i = 0; i < HPAGE_SIZE/PAGE_SIZE; i++) { |
53 | cond_resched(); | 53 | cond_resched(); |
54 | copy_user_highpage(dst + i, src + i, addr + i*PAGE_SIZE); | 54 | copy_user_highpage(dst + i, src + i, addr + i*PAGE_SIZE, vma); |
55 | } | 55 | } |
56 | } | 56 | } |
57 | 57 | ||
@@ -442,7 +442,7 @@ static int hugetlb_cow(struct mm_struct *mm, struct vm_area_struct *vma, | |||
442 | } | 442 | } |
443 | 443 | ||
444 | spin_unlock(&mm->page_table_lock); | 444 | spin_unlock(&mm->page_table_lock); |
445 | copy_huge_page(new_page, old_page, address); | 445 | copy_huge_page(new_page, old_page, address, vma); |
446 | spin_lock(&mm->page_table_lock); | 446 | spin_lock(&mm->page_table_lock); |
447 | 447 | ||
448 | ptep = huge_pte_offset(mm, address & HPAGE_MASK); | 448 | ptep = huge_pte_offset(mm, address & HPAGE_MASK); |