]> 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>
Wed, 20 Mar 2013 04:07:27 +0000 (15:07 +1100)
committerStephen Rothwell <sfr@canb.auug.org.au>
Thu, 21 Mar 2013 05:33:54 +0000 (16:33 +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 2664a47cec93721d6c73aafa85f32c11a5fb13e6..9da664e293708abc4769685e71a37f3dbbee568f 100644 (file)
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -1933,9 +1933,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;