From: Hugh Dickins Date: Wed, 22 Jun 2005 00:15:08 +0000 (-0700) Subject: [PATCH] dup_mmap: update comment on new vma X-Git-Tag: v2.6.13-rc4~130^2~202^2~136 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=45918e1a8bfcabc1cb4570b8df276655020eac45;p=linux-2.6-omap-h63xx.git [PATCH] dup_mmap: update comment on new vma Remove part of comment on linking new vma in dup_mmap: since anon_vma rmap came in, try_to_unmap_one knows the vma without needing find_vma. But add a comment to note that here vma is inserted without mmap_sem. Signed-off-by: Hugh Dickins Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/kernel/fork.c b/kernel/fork.c index 876b31cd822..a28d11e1087 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -250,8 +250,9 @@ static inline int dup_mmap(struct mm_struct * mm, struct mm_struct * oldmm) /* * Link in the new vma and copy the page table entries: - * link in first so that swapoff can see swap entries, - * and try_to_unmap_one's find_vma find the new vma. + * link in first so that swapoff can see swap entries. + * Note that, exceptionally, here the vma is inserted + * without holding mm->mmap_sem. */ spin_lock(&mm->page_table_lock); *pprev = tmp;