Skip to contentSkip to conversation

+ kernel-forkc-remove-redundant-null-check-in-dup_mm.patch added to -mm tree

PATCH [email protected] 1 participant 1 message Dec 2, 2013

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: + kernel-forkc-remove-redundant-null-check-in-dup_mm.patch added to -mm tree
To: [email protected],[email protected]
From: [email protected]
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 <[email protected]>
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().

---

 kernel/fork.c |    3 ---
 1 file changed, 3 deletions(-)
kernel/fork.c renamed from kernel/fork.c~kernel-forkc-remove-redundant-null-check-in-dup_mm +0 -2
diff -puN kernel/fork.c~kernel-forkc-remove-redundant-null-check-in-dup_mm 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;