mm/memory.c:print_vma_addr(): call up_read(&mm->mmap_sem) directly
authorJeff Liu <jeff.liu@oracle.com>
Tue, 31 Jul 2012 23:43:18 +0000 (16:43 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Wed, 1 Aug 2012 01:42:43 +0000 (18:42 -0700)
Call up_read(&mm->mmap_sem) directly since we have already got mm via
current->mm at the beginning of print_vma_addr().

Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
mm/memory.c

index 59e5beb..ec72a61 100644 (file)
@@ -3941,7 +3941,7 @@ void print_vma_addr(char *prefix, unsigned long ip)
                        free_page((unsigned long)buf);
                }
        }
-       up_read(&current->mm->mmap_sem);
+       up_read(&mm->mmap_sem);
 }
 
 #ifdef CONFIG_PROVE_LOCKING