[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>
This commit is contained in:
Родитель
86d912f41d
Коммит
9e9bef07ce
|
@ -1728,10 +1728,8 @@ static int do_swap_page(struct mm_struct *mm, struct vm_area_struct *vma,
|
||||||
*/
|
*/
|
||||||
spin_lock(&mm->page_table_lock);
|
spin_lock(&mm->page_table_lock);
|
||||||
page_table = pte_offset_map(pmd, address);
|
page_table = pte_offset_map(pmd, address);
|
||||||
if (unlikely(!pte_same(*page_table, orig_pte))) {
|
if (unlikely(!pte_same(*page_table, orig_pte)))
|
||||||
ret = VM_FAULT_MINOR;
|
|
||||||
goto out_nomap;
|
goto out_nomap;
|
||||||
}
|
|
||||||
|
|
||||||
if (unlikely(!PageUptodate(page))) {
|
if (unlikely(!PageUptodate(page))) {
|
||||||
ret = VM_FAULT_SIGBUS;
|
ret = VM_FAULT_SIGBUS;
|
||||||
|
|
Загрузка…
Ссылка в новой задаче