diff options
author | Hugh Dickins <hugh@veritas.com> | 2005-10-30 01:16:15 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 04:40:39 (GMT) |
commit | 9e9bef07ce5a342aa6246ebc5c20829d0d5d63d0 (patch) | |
tree | 6f7286ebbb2c4b8af7bb04897a64b054c67faa4a /mm/memory.c | |
parent | 86d912f41dca32eca8827f2f878139735e69dc28 (diff) | |
download | linux-fsl-qoriq-9e9bef07ce5a342aa6246ebc5c20829d0d5d63d0.tar.xz |
[PATCH] mm: do_swap_page race major
Small adjustment: do_swap_page should report its !pte_same race as a major
fault if it had to read into swap cache, because whatever raced with it will
have found page already in cache and reported minor fault.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm/memory.c')
-rw-r--r-- | mm/memory.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/mm/memory.c b/mm/memory.c index bc62963..a25ee1d 100644 --- a/mm/memory.c +++ b/mm/memory.c @@ -1728,10 +1728,8 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma, */ spin_lock(&mm->page_table_lock); page_table = pte_offset_map(pmd, address); - if (unlikely(!pte_same(*page_table, orig_pte))) { - ret = VM_FAULT_MINOR; + if (unlikely(!pte_same(*page_table, orig_pte))) goto out_nomap; - } if (unlikely(!PageUptodate(page))) { ret = VM_FAULT_SIGBUS; |