Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 11342
b: refs/heads/master
c: fd3e42f
h: refs/heads/master
v: v3
  • Loading branch information
Hugh Dickins authored and Linus Torvalds committed Oct 30, 2005
1 parent 9f71249 commit 1bd466a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ae859762332f19bfc06f4c4a1b1fefb41e9e1084
refs/heads/master: fd3e42fcc888a773572282575d2fdbf5cfd6216e
12 changes: 6 additions & 6 deletions trunk/kernel/fork.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,16 +182,16 @@ static struct task_struct *dup_task_struct(struct task_struct *orig)
}

#ifdef CONFIG_MMU
static inline int dup_mmap(struct mm_struct * mm, struct mm_struct * oldmm)
static inline int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
{
struct vm_area_struct * mpnt, *tmp, **pprev;
struct vm_area_struct *mpnt, *tmp, **pprev;
struct rb_node **rb_link, *rb_parent;
int retval;
unsigned long charge;
struct mempolicy *pol;

down_write(&oldmm->mmap_sem);
flush_cache_mm(current->mm);
flush_cache_mm(oldmm);
mm->locked_vm = 0;
mm->mmap = NULL;
mm->mmap_cache = NULL;
Expand All @@ -204,7 +204,7 @@ static inline int dup_mmap(struct mm_struct * mm, struct mm_struct * oldmm)
rb_parent = NULL;
pprev = &mm->mmap;

for (mpnt = current->mm->mmap ; mpnt ; mpnt = mpnt->vm_next) {
for (mpnt = oldmm->mmap; mpnt; mpnt = mpnt->vm_next) {
struct file *file;

if (mpnt->vm_flags & VM_DONTCOPY) {
Expand Down Expand Up @@ -265,7 +265,7 @@ static inline int dup_mmap(struct mm_struct * mm, struct mm_struct * oldmm)
rb_parent = &tmp->vm_rb;

mm->map_count++;
retval = copy_page_range(mm, current->mm, tmp);
retval = copy_page_range(mm, oldmm, tmp);
spin_unlock(&mm->page_table_lock);

if (tmp->vm_ops && tmp->vm_ops->open)
Expand All @@ -277,7 +277,7 @@ static inline int dup_mmap(struct mm_struct * mm, struct mm_struct * oldmm)
retval = 0;

out:
flush_tlb_mm(current->mm);
flush_tlb_mm(oldmm);
up_write(&oldmm->mmap_sem);
return retval;
fail_nomem_policy:
Expand Down

0 comments on commit 1bd466a

Please sign in to comment.