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
2120 cgroup_fork(p);2120 cgroup_fork(p);
2121 if (p->flags & PF_KTHREAD) {2121 if (p->flags & PF_KTHREAD) {
2122 if (!set_kthread_struct(p))2122 if (!set_kthread_struct(p))
2123 goto bad_fork_cleanup_threadgroup_lock;2123 goto bad_fork_cleanup_delayacct;
2124 }2124 }
2125#ifdef CONFIG_NUMA2125#ifdef CONFIG_NUMA
2126 p->mempolicy = mpol_dup(p->mempolicy);2126 p->mempolicy = mpol_dup(p->mempolicy);
2127 if (IS_ERR(p->mempolicy)) {2127 if (IS_ERR(p->mempolicy)) {
2128 retval = PTR_ERR(p->mempolicy);2128 retval = PTR_ERR(p->mempolicy);
2129 p->mempolicy = NULL;2129 p->mempolicy = NULL;
2130 goto bad_fork_cleanup_threadgroup_lock;2130 goto bad_fork_cleanup_delayacct;
2131 }2131 }
2132#endif2132#endif
2133#ifdef CONFIG_CPUSETS2133#ifdef CONFIG_CPUSETS
@@ -2465,7 +2465,7 @@ bad_fork_cleanup_policy: · 331 unmodified lines
2465#ifdef CONFIG_NUMA2465#ifdef CONFIG_NUMA
2466 mpol_put(p->mempolicy);2466 mpol_put(p->mempolicy);
2467#endif2467#endif
2468bad_fork_cleanup_threadgroup_lock:2468bad_fork_cleanup_delayacct:
2469 delayacct_tsk_free(p);2469 delayacct_tsk_free(p);
2470bad_fork_cleanup_count:2470bad_fork_cleanup_count:
2471 dec_rlimit_ucounts(task_ucounts(p), UCOUNT_RLIMIT_NPROC, 1);2471 dec_rlimit_ucounts(task_ucounts(p), UCOUNT_RLIMIT_NPROC, 1);