summaryrefslogtreecommitdiff
path: root/include/asm-um/mmu_context.h
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2008-06-16 11:15:58 +0200
committerIngo Molnar <mingo@elte.hu>2008-06-16 11:15:58 +0200
commite765ee90da62535ac7d7a97f2464f9646539d683 (patch)
tree7a9cecce5aab958938e9a3bf46c2302d6af1958c /include/asm-um/mmu_context.h
parenta4500b84c51645bbc86be3ca84f2252b7ada060f (diff)
parent066519068ad2fbe98c7f45552b1f592903a9c8c8 (diff)
Diffstat (limited to 'include/asm-um/mmu_context.h')
-rw-r--r--include/asm-um/mmu_context.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/include/asm-um/mmu_context.h b/include/asm-um/mmu_context.h
index 6686fc524ca1..54f42e8b0105 100644
--- a/include/asm-um/mmu_context.h
+++ b/include/asm-um/mmu_context.h
@@ -22,16 +22,10 @@ extern void force_flush_all(void);
static inline void activate_mm(struct mm_struct *old, struct mm_struct *new)
{
/*
- * This is called by fs/exec.c and fs/aio.c. In the first case, for an
- * exec, we don't need to do anything as we're called from userspace
- * and thus going to use a new host PID. In the second, we're called
- * from a kernel thread, and thus need to go doing the mmap's on the
- * host. Since they're very expensive, we want to avoid that as far as
- * possible.
+ * This is called by fs/exec.c and sys_unshare()
+ * when the new ->mm is used for the first time.
*/
- if (old != new && (current->flags & PF_BORROWED_MM))
- __switch_mm(&new->context.id);
-
+ __switch_mm(&new->context.id);
arch_dup_mmap(old, new);
}