diff options
author | Daeseok Youn <daeseok.youn@gmail.com> | 2014-01-10 12:42:04 +1100 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2014-01-10 12:42:04 +1100 |
commit | 20eea90f575bcb8ca4f7432996ee87ebb18e1e34 (patch) | |
tree | 261aad6390980b76a61f44df3bd52c25abf011e4 /kernel | |
parent | 3bd19ad44d482052057023c1210686ee936d6ce5 (diff) |
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@gmail.com>
Acked-by: Oleg Nesterov <oleg@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Diffstat (limited to 'kernel')
-rw-r--r-- | kernel/fork.c | 3 |
1 files changed, 0 insertions, 3 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 26224886fa21..b824096c4c0b 100644 --- a/kernel/fork.c +++ b/kernel/fork.c @@ -805,9 +805,6 @@ static struct mm_struct *dup_mm(struct task_struct *tsk) struct mm_struct *mm, *oldmm = current->mm; int err; - if (!oldmm) - return NULL; - mm = allocate_mm(); if (!mm) goto fail_nomem; |