Commit d32870ad authored by Paolo \'Blaisorblade\' Giarrusso's avatar Paolo \'Blaisorblade\' Giarrusso Committed by Linus Torvalds

[PATCH] uml: Removes dead code in trap_kern.c

That code comes from the out_of_memory section; in 2.4 it was correct to put
it for "default:", since it was called when handle_mm_fault() return value was
!= 0, 1, 2, i.e.  it was 3, OOM (but the i386 code put it out of line, for
better performance).  Here, instead, the OOM case is handled on its own, so if
handle_mm_fault() != from the listed cases we must BUG().
Signed-off-by: default avatarPaolo 'Blaisorblade' Giarrusso <blaisorblade_spam@yahoo.it>
Cc: Jeff Dike <jdike@addtoit.com>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 3b2dcf38
......@@ -74,13 +74,7 @@ int handle_page_fault(unsigned long address, unsigned long ip,
err = -ENOMEM;
goto out_of_memory;
default:
if (current->pid == 1) {
up_read(&mm->mmap_sem);
yield();
down_read(&mm->mmap_sem);
goto survive;
}
goto out;
BUG();
}
pte = pte_offset_kernel(pmd, page);
} while(!pte_present(*pte));
......@@ -103,7 +97,6 @@ int handle_page_fault(unsigned long address, unsigned long ip,
down_read(&mm->mmap_sem);
goto survive;
}
err = -ENOMEM;
goto out;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment