From: Rajman Mekaco Date: Tue, 29 May 2012 22:06:21 +0000 (-0700) Subject: mm/mmap.c: find_vma(): remove unnecessary if(mm) check X-Git-Tag: v3.5-rc1~49^2~166 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=841e31e5cc6219d62054788faa289b6ed682d068;p=pandora-kernel.git mm/mmap.c: find_vma(): remove unnecessary if(mm) check The "if (mm)" check is not required in find_vma, as the kernel code calls find_vma only when it is absolutely sure that the mm_struct arg to it is non-NULL. Remove the if(mm) check and adding the a WARN_ONCE(!mm) for now. This will serve the purpose of mandating that the execution context(user-mode/kernel-mode) be known before find_vma is called. Also fixed 2 checkpatch.pl errors in the declaration of the rb_node and vma_tmp local variables. I was browsing through the internet and read a discussion at https://lkml.org/lkml/2012/3/27/342 which discusses removal of the validation check within find_vma. Since no-one responded, I decided to send this patch with Andrew's suggestions. [akpm@linux-foundation.org: add remove-me comment] Signed-off-by: Rajman Mekaco Cc: Kautuk Consul Cc: Hugh Dickins Cc: KAMEZAWA Hiroyuki Acked-by: KOSAKI Motohiro Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed