Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 167772
b: refs/heads/master
c: c36987e
h: refs/heads/master
v: v3
  • Loading branch information
Daisuke Nishimura authored and Linus Torvalds committed Oct 29, 2009
1 parent b7df263 commit 123e452
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 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: 2545f038f4af0ff9945d47c10f988418dda50140
refs/heads/master: c36987e2ef32e1bb7850379515f21187cba44754
11 changes: 7 additions & 4 deletions trunk/mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,6 +641,7 @@ static int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm,
pmd_t *dst_pmd, pmd_t *src_pmd, struct vm_area_struct *vma,
unsigned long addr, unsigned long end)
{
pte_t *orig_src_pte, *orig_dst_pte;
pte_t *src_pte, *dst_pte;
spinlock_t *src_ptl, *dst_ptl;
int progress = 0;
Expand All @@ -654,6 +655,8 @@ static int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm,
src_pte = pte_offset_map_nested(src_pmd, addr);
src_ptl = pte_lockptr(src_mm, src_pmd);
spin_lock_nested(src_ptl, SINGLE_DEPTH_NESTING);
orig_src_pte = src_pte;
orig_dst_pte = dst_pte;
arch_enter_lazy_mmu_mode();

do {
Expand All @@ -677,9 +680,9 @@ static int copy_pte_range(struct mm_struct *dst_mm, struct mm_struct *src_mm,

arch_leave_lazy_mmu_mode();
spin_unlock(src_ptl);
pte_unmap_nested(src_pte - 1);
pte_unmap_nested(orig_src_pte);
add_mm_rss(dst_mm, rss[0], rss[1]);
pte_unmap_unlock(dst_pte - 1, dst_ptl);
pte_unmap_unlock(orig_dst_pte, dst_ptl);
cond_resched();
if (addr != end)
goto again;
Expand Down Expand Up @@ -1820,10 +1823,10 @@ static int apply_to_pte_range(struct mm_struct *mm, pmd_t *pmd,
token = pmd_pgtable(*pmd);

do {
err = fn(pte, token, addr, data);
err = fn(pte++, token, addr, data);
if (err)
break;
} while (pte++, addr += PAGE_SIZE, addr != end);
} while (addr += PAGE_SIZE, addr != end);

arch_leave_lazy_mmu_mode();

Expand Down

0 comments on commit 123e452

Please sign in to comment.