diff options
author | Daeseok Youn <daeseok.youn@gmail.com> | 2014-01-23 18:55:48 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2014-01-23 19:37:02 -0500 |
commit | 68ce670b6e8edc30551862e7f6a306e45389e189 (patch) | |
tree | 6d11b7ba37a902af3640da2eeb7e1ab701e607ec /kernel/fork.c | |
parent | 5d59e18270d4769c9160c282b25c00b6fc004ffb (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>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'kernel/fork.c')
-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 01ccc6109918..b6dd0bbf4240 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -805,9 +805,6 @@ static struct mm_struct *dup_mm(struct task_struct *tsk) | |||
805 | struct mm_struct *mm, *oldmm = current->mm; | 805 | struct mm_struct *mm, *oldmm = current->mm; |
806 | int err; | 806 | int err; |
807 | 807 | ||
808 | if (!oldmm) | ||
809 | return NULL; | ||
810 | |||
811 | mm = allocate_mm(); | 808 | mm = allocate_mm(); |
812 | if (!mm) | 809 | if (!mm) |
813 | goto fail_nomem; | 810 | goto fail_nomem; |