Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 44554
b: refs/heads/master
c: 9de455b
h: refs/heads/master
v: v3
  • Loading branch information
Atsushi Nemoto authored and Linus Torvalds committed Dec 13, 2006
1 parent 43a2d97 commit 51bf3a6
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 77fff4ae2b7bba6d66a8287d9ab948e2b6c16145
refs/heads/master: 9de455b20705f36384a711d4a20bcf7ba1ab180b
3 changes: 2 additions & 1 deletion trunk/include/linux/highmem.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ static inline void memclear_highpage_flush(struct page *page, unsigned int offse

#ifndef __HAVE_ARCH_COPY_USER_HIGHPAGE

static inline void copy_user_highpage(struct page *to, struct page *from, unsigned long vaddr)
static inline void copy_user_highpage(struct page *to, struct page *from,
unsigned long vaddr, struct vm_area_struct *vma)
{
char *vfrom, *vto;

Expand Down
6 changes: 3 additions & 3 deletions trunk/mm/hugetlb.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ static void clear_huge_page(struct page *page, unsigned long addr)
}

static void copy_huge_page(struct page *dst, struct page *src,
unsigned long addr)
unsigned long addr, struct vm_area_struct *vma)
{
int i;

might_sleep();
for (i = 0; i < HPAGE_SIZE/PAGE_SIZE; i++) {
cond_resched();
copy_user_highpage(dst + i, src + i, addr + i*PAGE_SIZE);
copy_user_highpage(dst + i, src + i, addr + i*PAGE_SIZE, vma);
}
}

Expand Down Expand Up @@ -442,7 +442,7 @@ static int hugetlb_cow(struct mm_struct *mm, struct vm_area_struct *vma,
}

spin_unlock(&mm->page_table_lock);
copy_huge_page(new_page, old_page, address);
copy_huge_page(new_page, old_page, address, vma);
spin_lock(&mm->page_table_lock);

ptep = huge_pte_offset(mm, address & HPAGE_MASK);
Expand Down
10 changes: 5 additions & 5 deletions trunk/mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -1441,7 +1441,7 @@ static inline pte_t maybe_mkwrite(pte_t pte, struct vm_area_struct *vma)
return pte;
}

static inline void cow_user_page(struct page *dst, struct page *src, unsigned long va)
static inline void cow_user_page(struct page *dst, struct page *src, unsigned long va, struct vm_area_struct *vma)
{
/*
* If the source page was a PFN mapping, we don't have
Expand All @@ -1464,9 +1464,9 @@ static inline void cow_user_page(struct page *dst, struct page *src, unsigned lo
kunmap_atomic(kaddr, KM_USER0);
flush_dcache_page(dst);
return;

}
copy_user_highpage(dst, src, va);
copy_user_highpage(dst, src, va, vma);
}

/*
Expand Down Expand Up @@ -1577,7 +1577,7 @@ static int do_wp_page(struct mm_struct *mm, struct vm_area_struct *vma,
new_page = alloc_page_vma(GFP_HIGHUSER, vma, address);
if (!new_page)
goto oom;
cow_user_page(new_page, old_page, address);
cow_user_page(new_page, old_page, address, vma);
}

/*
Expand Down Expand Up @@ -2200,7 +2200,7 @@ static int do_no_page(struct mm_struct *mm, struct vm_area_struct *vma,
page = alloc_page_vma(GFP_HIGHUSER, vma, address);
if (!page)
goto oom;
copy_user_highpage(page, new_page, address);
copy_user_highpage(page, new_page, address, vma);
page_cache_release(new_page);
new_page = page;
anon = 1;
Expand Down

0 comments on commit 51bf3a6

Please sign in to comment.