* [merged] simplify-copy_mm.patch removed from -mm tree
@ 2021-05-08 22:53 akpm
0 siblings, 0 replies; only message in thread
From: akpm @ 2021-05-08 22:53 UTC (permalink / raw)
To: akpm, eb, mm-commits
The patch titled
Subject: kernel/fork.c: simplify copy_mm()
has been removed from the -mm tree. Its filename was
simplify-copy_mm.patch
This patch was dropped because it was merged into mainline or a subsystem tree
------------------------------------------------------
From: Rolf Eike Beer <eb@emlix.com>
Subject: kernel/fork.c: simplify copy_mm()
All this can happen without a single goto.
Link: https://lkml.kernel.org/r/2072685.XptgVkyDqn@devpool47
Signed-off-by: Rolf Eike Beer <eb@emlix.com>
Reviewed-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---
kernel/fork.c | 15 ++++-----------
1 file changed, 4 insertions(+), 11 deletions(-)
--- a/kernel/fork.c~simplify-copy_mm
+++ a/kernel/fork.c
@@ -1396,7 +1396,6 @@ fail_nomem:
static int copy_mm(unsigned long clone_flags, struct task_struct *tsk)
{
struct mm_struct *mm, *oldmm;
- int retval;
tsk->min_flt = tsk->maj_flt = 0;
tsk->nvcsw = tsk->nivcsw = 0;
@@ -1423,21 +1422,15 @@ static int copy_mm(unsigned long clone_f
if (clone_flags & CLONE_VM) {
mmget(oldmm);
mm = oldmm;
- goto good_mm;
+ } else {
+ mm = dup_mm(tsk, current->mm);
+ if (!mm)
+ return -ENOMEM;
}
- retval = -ENOMEM;
- mm = dup_mm(tsk, current->mm);
- if (!mm)
- goto fail_nomem;
-
-good_mm:
tsk->mm = mm;
tsk->active_mm = mm;
return 0;
-
-fail_nomem:
- return retval;
}
static int copy_fs(unsigned long clone_flags, struct task_struct *tsk)
_
Patches currently in -mm which might be from eb@emlix.com are
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-05-08 22:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-08 22:53 [merged] simplify-copy_mm.patch removed from -mm tree akpm
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.