Subject: + kernel-forkc-remove-redundant-null-check-in-dup_mm.patch added to -mm tree To: daeseok.youn@xxxxxxxxx,oleg@xxxxxxxxxx From: akpm@xxxxxxxxxxxxxxxxxxxx Date: Mon, 02 Dec 2013 14:08:20 -0800 The patch titled Subject: kernel/fork.c: remove redundant NULL check in dup_mm() has been added to the -mm tree. Its filename is kernel-forkc-remove-redundant-null-check-in-dup_mm.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/kernel-forkc-remove-redundant-null-check-in-dup_mm.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/kernel-forkc-remove-redundant-null-check-in-dup_mm.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Daeseok Youn <daeseok.youn@xxxxxxxxx> Subject: kernel/fork.c: remove redundant NULL check in dup_mm() current->mm doesn't need a NULL check in dup_mm(). Becasue dup_mm() is used only in copy_mm() and current->mm is checked whether it is NULL or not in copy_mm() before calling dup_mm(). Signed-off-by: Daeseok Youn <daeseok.youn@xxxxxxxxx> Acked-by: Oleg Nesterov <oleg@xxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- kernel/fork.c | 3 --- 1 file changed, 3 deletions(-) diff -puN kernel/fork.c~kernel-forkc-remove-redundant-null-check-in-dup_mm kernel/fork.c --- a/kernel/fork.c~kernel-forkc-remove-redundant-null-check-in-dup_mm +++ a/kernel/fork.c @@ -804,9 +804,6 @@ static struct mm_struct *dup_mm(struct t struct mm_struct *mm, *oldmm = current->mm; int err; - if (!oldmm) - return NULL; - mm = allocate_mm(); if (!mm) goto fail_nomem; _ Patches currently in -mm which might be from daeseok.youn@xxxxxxxxx are kernel-forkc-make-dup_mm-static.patch kernel-forkc-fix-coding-style-issues.patch kernel-forkc-remove-redundant-null-check-in-dup_mm.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html