History

fork: Rename bad_fork_cleanup_threadgroup_lock to bad_fork_cleanup_delayacct

I just fixed a bug in copy_process when using the label bad_fork_cleanup_threadgroup_lock. While fixing the bug I looked closer at the label and realized it has been misnamed since 568ac888215c ("cgroup: reduce read locked section of cgroup_threadgroup_rwsem during fork"). Fix the name so that fork is easier to understand.

Eric W. Biederman committed 4 years ago

Commit ff8288f1 parent 6692c981 file · +3 −3Browse files

Showing the changes to kernel (1 of 1 file). Show all

Unified · Split

kernel/fork.c+3−3
@@ -2120,14 +2120,14 @@ static __latent_entropy struct task_struct *copy_process( · 2119 unmodified lines
21202120 cgroup_fork(p);
21212121 if (p->flags & PF_KTHREAD) {
21222122 if (!set_kthread_struct(p))
2123− goto bad_fork_cleanup_threadgroup_lock;
2123+ goto bad_fork_cleanup_delayacct;
21242124 }
21252125 #ifdef CONFIG_NUMA
21262126 p->mempolicy = mpol_dup(p->mempolicy);
21272127 if (IS_ERR(p->mempolicy)) {
21282128 retval = PTR_ERR(p->mempolicy);
21292129 p->mempolicy = NULL;
2130− goto bad_fork_cleanup_threadgroup_lock;
2130+ goto bad_fork_cleanup_delayacct;
21312131 }
21322132 #endif
21332133 #ifdef CONFIG_CPUSETS
@@ -2465,7 +2465,7 @@ bad_fork_cleanup_policy: · 331 unmodified lines
24652465 #ifdef CONFIG_NUMA
24662466 mpol_put(p->mempolicy);
24672467 #endif
2468−bad_fork_cleanup_threadgroup_lock:
2468+bad_fork_cleanup_delayacct:
24692469 delayacct_tsk_free(p);
24702470 bad_fork_cleanup_count:
24712471 dec_rlimit_ucounts(task_ucounts(p), UCOUNT_RLIMIT_NPROC, 1);