Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 65286
b: refs/heads/master
c: 9cdcaa2
h: refs/heads/master
v: v3
  • Loading branch information
Linus Torvalds committed Oct 4, 2007
1 parent e637087 commit b2ad629
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 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: d5e89385e92a77b2764d9eb8284808a7628cb2a8
refs/heads/master: 9cdcaa2c9330432bfe891d40f2d914b80bbcf9f3
14 changes: 6 additions & 8 deletions trunk/mm/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -2307,13 +2307,14 @@ static int do_anonymous_page(struct mm_struct *mm, struct vm_area_struct *vma,
* do not need to flush old virtual caches or the TLB.
*
* We enter with non-exclusive mmap_sem (to exclude vma changes,
* but allow concurrent faults), and pte mapped but not yet locked.
* but allow concurrent faults), and pte neither mapped nor locked.
* We return with mmap_sem still held, but pte unmapped and unlocked.
*/
static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
unsigned long address, pte_t *page_table, pmd_t *pmd,
unsigned long address, pmd_t *pmd,
pgoff_t pgoff, unsigned int flags, pte_t orig_pte)
{
pte_t *page_table;
spinlock_t *ptl;
struct page *page;
pte_t entry;
Expand All @@ -2327,7 +2328,6 @@ static int __do_fault(struct mm_struct *mm, struct vm_area_struct *vma,
vmf.flags = flags;
vmf.page = NULL;

pte_unmap(page_table);
BUG_ON(vma->vm_flags & VM_PFNMAP);

if (likely(vma->vm_ops->fault)) {
Expand Down Expand Up @@ -2468,8 +2468,8 @@ static int do_linear_fault(struct mm_struct *mm, struct vm_area_struct *vma,
- vma->vm_start) >> PAGE_CACHE_SHIFT) + vma->vm_pgoff;
unsigned int flags = (write_access ? FAULT_FLAG_WRITE : 0);

return __do_fault(mm, vma, address, page_table, pmd, pgoff,
flags, orig_pte);
pte_unmap(page_table);
return __do_fault(mm, vma, address, pmd, pgoff, flags, orig_pte);
}


Expand Down Expand Up @@ -2552,9 +2552,7 @@ static int do_nonlinear_fault(struct mm_struct *mm, struct vm_area_struct *vma,
}

pgoff = pte_to_pgoff(orig_pte);

return __do_fault(mm, vma, address, page_table, pmd, pgoff,
flags, orig_pte);
return __do_fault(mm, vma, address, pmd, pgoff, flags, orig_pte);
}

/*
Expand Down

0 comments on commit b2ad629

Please sign in to comment.