aboutsummaryrefslogtreecommitdiffstats
path: root/kernel
diff options
context:
space:
mode:
authorAndrew Morton <akpm@osdl.org>2004-05-22 08:10:00 -0700
committerLinus Torvalds <torvalds@ppc970.osdl.org>2004-05-22 08:10:00 -0700
commita89cd0f027d187c9c639a171aee7ee80b5a37da5 (patch)
tree3009be607705b1d950b6674e7a215f7faa67e951 /kernel
parente1fd9cc9cbb5ac6465601833ea1cc5d6d376a155 (diff)
downloadhistory-a89cd0f027d187c9c639a171aee7ee80b5a37da5.tar.gz
[PATCH] rmap 38 remove anonmm rmap
From: Hugh Dickins <hugh@veritas.com> Before moving on to anon_vma rmap, remove now what's peculiar to anonmm rmap: the anonmm handling and the mremap move cows. Temporarily reduce page_referenced_anon and try_to_unmap_anon to stubs, so a kernel built with this patch will not swap anonymous at all.
Diffstat (limited to 'kernel')
-rw-r--r--kernel/fork.c13
1 files changed, 0 insertions, 13 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index ef85a909e171f8..8a22fa867885d8 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -432,11 +432,6 @@ struct mm_struct * mm_alloc(void)
if (mm) {
memset(mm, 0, sizeof(*mm));
mm = mm_init(mm);
- if (mm && exec_rmap(mm)) {
- mm_free_pgd(mm);
- free_mm(mm);
- mm = NULL;
- }
}
return mm;
}
@@ -465,7 +460,6 @@ void mmput(struct mm_struct *mm)
spin_unlock(&mmlist_lock);
exit_aio(mm);
exit_mmap(mm);
- exit_rmap(mm);
mmdrop(mm);
}
}
@@ -569,12 +563,6 @@ static int copy_mm(unsigned long clone_flags, struct task_struct * tsk)
if (!mm_init(mm))
goto fail_nomem;
- if (dup_rmap(mm, oldmm)) {
- mm_free_pgd(mm);
- free_mm(mm);
- goto fail_nomem;
- }
-
if (init_new_context(tsk,mm))
goto fail_nocontext;
@@ -1298,5 +1286,4 @@ void __init proc_caches_init(void)
mm_cachep = kmem_cache_create("mm_struct",
sizeof(struct mm_struct), 0,
SLAB_HWCACHE_ALIGN|SLAB_PANIC, NULL, NULL);
- init_rmap();
}