aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/fork.c
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2011-12-12 21:12:21 -0500
committerTejun Heo <tj@kernel.org>2011-12-12 21:12:21 -0500
commit257058ae2b971646b96ab3a15605ac69186e562a (patch)
treeb8a462e64c4bb4b43dcc6c9d05b194f9c747c91d /kernel/fork.c
parente25e2cbb4c6679bed5f52fb0f2cc381688297901 (diff)
threadgroup: rename signal->threadgroup_fork_lock to ->group_rwsem
Make the following renames to prepare for extension of threadgroup locking. * s/signal->threadgroup_fork_lock/signal->group_rwsem/ * s/threadgroup_fork_read_lock()/threadgroup_change_begin()/ * s/threadgroup_fork_read_unlock()/threadgroup_change_end()/ * s/threadgroup_fork_write_lock()/threadgroup_lock()/ * s/threadgroup_fork_write_unlock()/threadgroup_unlock()/ This patch doesn't cause any behavior change. -v2: Rename threadgroup_change_done() to threadgroup_change_end() per KAMEZAWA's suggestion. Signed-off-by: Tejun Heo <tj@kernel.org> Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com> Acked-by: Li Zefan <lizf@cn.fujitsu.com> Cc: Oleg Nesterov <oleg@redhat.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Paul Menage <paul@paulmenage.org>
Diffstat (limited to 'kernel/fork.c')
-rw-r--r--kernel/fork.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/kernel/fork.c b/kernel/fork.c
index 827808613847..d4ac9e3e0075 100644
--- a/kernel/fork.c
+++ b/kernel/fork.c
@@ -972,7 +972,7 @@ static int copy_signal(unsigned long clone_flags, struct task_struct *tsk)
972 sched_autogroup_fork(sig); 972 sched_autogroup_fork(sig);
973 973
974#ifdef CONFIG_CGROUPS 974#ifdef CONFIG_CGROUPS
975 init_rwsem(&sig->threadgroup_fork_lock); 975 init_rwsem(&sig->group_rwsem);
976#endif 976#endif
977 977
978 sig->oom_adj = current->signal->oom_adj; 978 sig->oom_adj = current->signal->oom_adj;
@@ -1157,7 +1157,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1157 p->io_context = NULL; 1157 p->io_context = NULL;
1158 p->audit_context = NULL; 1158 p->audit_context = NULL;
1159 if (clone_flags & CLONE_THREAD) 1159 if (clone_flags & CLONE_THREAD)
1160 threadgroup_fork_read_lock(current); 1160 threadgroup_change_begin(current);
1161 cgroup_fork(p); 1161 cgroup_fork(p);
1162#ifdef CONFIG_NUMA 1162#ifdef CONFIG_NUMA
1163 p->mempolicy = mpol_dup(p->mempolicy); 1163 p->mempolicy = mpol_dup(p->mempolicy);
@@ -1372,7 +1372,7 @@ static struct task_struct *copy_process(unsigned long clone_flags,
1372 proc_fork_connector(p); 1372 proc_fork_connector(p);
1373 cgroup_post_fork(p); 1373 cgroup_post_fork(p);
1374 if (clone_flags & CLONE_THREAD) 1374 if (clone_flags & CLONE_THREAD)
1375 threadgroup_fork_read_unlock(current); 1375 threadgroup_change_end(current);
1376 perf_event_fork(p); 1376 perf_event_fork(p);
1377 return p; 1377 return p;
1378 1378
@@ -1407,7 +1407,7 @@ bad_fork_cleanup_policy:
1407bad_fork_cleanup_cgroup: 1407bad_fork_cleanup_cgroup:
1408#endif 1408#endif
1409 if (clone_flags & CLONE_THREAD) 1409 if (clone_flags & CLONE_THREAD)
1410 threadgroup_fork_read_unlock(current); 1410 threadgroup_change_end(current);
1411 cgroup_exit(p, cgroup_callbacks_done); 1411 cgroup_exit(p, cgroup_callbacks_done);
1412 delayacct_tsk_free(p); 1412 delayacct_tsk_free(p);
1413 module_put(task_thread_info(p)->exec_domain->module); 1413 module_put(task_thread_info(p)->exec_domain->module);