patch-1.3.24 linux/kernel/fork.c
Next file: linux/kernel/sched.c
Previous file: linux/kernel/exit.c
Back to the patch index
Back to the overall index
- Lines: 44
- Date:
Tue Sep 5 10:30:29 1995
- Orig file:
v1.3.23/linux/kernel/fork.c
- Orig date:
Sun Sep 3 12:27:03 1995
diff -u --recursive --new-file v1.3.23/linux/kernel/fork.c linux/kernel/fork.c
@@ -79,20 +79,20 @@
return free_task;
}
-static int dup_mmap(struct task_struct * tsk)
+static int dup_mmap(struct mm_struct * mm)
{
struct vm_area_struct * mpnt, **p, *tmp;
- tsk->mm->mmap = NULL;
- p = &tsk->mm->mmap;
+ mm->mmap = NULL;
+ p = &mm->mmap;
for (mpnt = current->mm->mmap ; mpnt ; mpnt = mpnt->vm_next) {
tmp = (struct vm_area_struct *) kmalloc(sizeof(struct vm_area_struct), GFP_KERNEL);
if (!tmp) {
- exit_mmap(tsk);
+ exit_mmap(mm);
return -ENOMEM;
}
*tmp = *mpnt;
- tmp->vm_task = tsk;
+ tmp->vm_mm = mm;
tmp->vm_next = NULL;
if (tmp->vm_inode) {
tmp->vm_inode->i_count++;
@@ -106,7 +106,7 @@
*p = tmp;
p = &tmp->vm_next;
}
- build_mmap_avl(tsk);
+ build_mmap_avl(mm);
return 0;
}
@@ -126,7 +126,7 @@
u->mm.cmin_flt = u->mm.cmaj_flt = 0;
if (copy_page_tables(&u->tsk))
return -1;
- if (dup_mmap(&u->tsk))
+ if (dup_mmap(&u->mm))
return -1;
mem_map[MAP_NR(u)]++;
return 0;
FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen, [email protected]
with Sam's (original) version of this