]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
mmap: find_vma: remove the WARN_ON_ONCE(!mm) check
authorZhang Yanfei <zhangyanfei@cn.fujitsu.com>
Tue, 26 Mar 2013 23:24:40 +0000 (10:24 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Tue, 2 Apr 2013 07:29:10 +0000 (18:29 +1100)
Remove the WARN_ON_ONCE(!mm) check as the comment suggested.  Kernel code
calls find_vma only when it is absolutely sure that the mm_struct arg to
it is non-NULL.

Signed-off-by: Zhang Yanfei <zhangyanfei@cn.fujitsu.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
mm/mmap.c

index 6466699b16cbca1a26c8792f9d484925a23df005..199318fbba3a786217aabb01fde7524517942fe6 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1935,9 +1935,6 @@ struct vm_area_struct *find_vma(struct mm_struct *mm, unsigned long addr)
 {
        struct vm_area_struct *vma = NULL;
 
-       if (WARN_ON_ONCE(!mm))          /* Remove this in linux-3.6 */
-               return NULL;
-
        /* Check the cache first. */
        /* (Cache hit rate is typically around 35%.) */
        vma = mm->mmap_cache;