diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-12 11:18:24 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2012-12-12 11:18:24 -0500 |
commit | d206e09036d6201f90b2719484c8a59526c46125 (patch) | |
tree | 84b9057919bcb8cfd1cff47baa5fc74457e77d6d /kernel/fork.c | |
parent | fef3ff2eb777e76cfa5ae67591982d902c17139c (diff) | |
parent | 15ef4ffaa797034d5ff82844daf8f595d7c6d53c (diff) |
Merge branch 'for-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup
Pull cgroup changes from Tejun Heo:
"A lot of activities on cgroup side. The big changes are focused on
making cgroup hierarchy handling saner.
- cgroup_rmdir() had peculiar semantics - it allowed cgroup
destruction to be vetoed by individual controllers and tried to
drain refcnt synchronously. The vetoing never worked properly and
caused good deal of contortions in cgroup. memcg was the last
reamining user. Michal Hocko removed the usage and cgroup_rmdir()
path has been simplified significantly. This was done in a
separate branch so that the memcg people can base further memcg
changes on top.
- The above allowed cleaning up cgroup lifecycle management and
implementation of generic cgroup iterators which are used to
improve hierarchy support.
- cgroup_freezer updated to allow migration in and out of a frozen
cgroup and handle hierarchy. If a cgroup is frozen, all descendant
cgroups are frozen.
- netcls_cgroup and netprio_cgroup updated to handle hierarchy
properly.
- Various fixes and cleanups.
- Two merge commits. One to pull in memcg and rmdir cleanups (needed
to build iterators). The other pulled in cgroup/for-3.7-fixes for
device_cgroup fixes so that further device_cgroup patches can be
stacked on top."
Fixed up a trivial conflict in mm/memcontrol.c as per Tejun (due to
commit bea8c150a7 ("memcg: fix hotplugged memory zone oops") in master
touching code close to commit 2ef37d3fe4 ("memcg: Simplify
mem_cgroup_force_empty_list error handling") in for-3.8)
* 'for-3.8' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/cgroup: (65 commits)
cgroup: update Documentation/cgroups/00-INDEX
cgroup_rm_file: don't delete the uncreated files
cgroup: remove subsystem files when remounting cgroup
cgroup: use cgroup_addrm_files() in cgroup_clear_directory()
cgroup: warn about broken hierarchies only after css_online
cgroup: list_del_init() on removed events
cgroup: fix lockdep warning for event_control
cgroup: move list add after list head initilization
netprio_cgroup: allow nesting and inherit config on cgroup creation
netprio_cgroup: implement netprio[_set]_prio() helpers
netprio_cgroup: use cgroup->id instead of cgroup_netprio_state->prioidx
netprio_cgroup: reimplement priomap expansion
netprio_cgroup: shorten variable names in extend_netdev_table()
netprio_cgroup: simplify write_priomap()
netcls_cgroup: move config inheritance to ->css_online() and remove .broken_hierarchy marking
cgroup: remove obsolete guarantee from cgroup_task_migrate.
cgroup: add cgroup->id
cgroup, cpuset: remove cgroup_subsys->post_clone()
cgroup: s/CGRP_CLONE_CHILDREN/CGRP_CPUSET_CLONE_CHILDREN/
cgroup: rename ->create/post_create/pre_destroy/destroy() to ->css_alloc/online/offline/free()
...
Diffstat (limited to 'kernel/fork.c')
-rw-r--r-- | kernel/fork.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/kernel/fork.c b/kernel/fork.c index 850dde1e0c84..79de9f99a48d 100644 --- a/kernel/fork.c +++ b/kernel/fork.c | |||
@@ -1137,7 +1137,6 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1137 | { | 1137 | { |
1138 | int retval; | 1138 | int retval; |
1139 | struct task_struct *p; | 1139 | struct task_struct *p; |
1140 | int cgroup_callbacks_done = 0; | ||
1141 | 1140 | ||
1142 | if ((clone_flags & (CLONE_NEWNS|CLONE_FS)) == (CLONE_NEWNS|CLONE_FS)) | 1141 | if ((clone_flags & (CLONE_NEWNS|CLONE_FS)) == (CLONE_NEWNS|CLONE_FS)) |
1143 | return ERR_PTR(-EINVAL); | 1142 | return ERR_PTR(-EINVAL); |
@@ -1395,12 +1394,6 @@ static struct task_struct *copy_process(unsigned long clone_flags, | |||
1395 | INIT_LIST_HEAD(&p->thread_group); | 1394 | INIT_LIST_HEAD(&p->thread_group); |
1396 | p->task_works = NULL; | 1395 | p->task_works = NULL; |
1397 | 1396 | ||
1398 | /* Now that the task is set up, run cgroup callbacks if | ||
1399 | * necessary. We need to run them before the task is visible | ||
1400 | * on the tasklist. */ | ||
1401 | cgroup_fork_callbacks(p); | ||
1402 | cgroup_callbacks_done = 1; | ||
1403 | |||
1404 | /* Need tasklist lock for parent etc handling! */ | 1397 | /* Need tasklist lock for parent etc handling! */ |
1405 | write_lock_irq(&tasklist_lock); | 1398 | write_lock_irq(&tasklist_lock); |
1406 | 1399 | ||
@@ -1505,7 +1498,7 @@ bad_fork_cleanup_cgroup: | |||
1505 | #endif | 1498 | #endif |
1506 | if (clone_flags & CLONE_THREAD) | 1499 | if (clone_flags & CLONE_THREAD) |
1507 | threadgroup_change_end(current); | 1500 | threadgroup_change_end(current); |
1508 | cgroup_exit(p, cgroup_callbacks_done); | 1501 | cgroup_exit(p, 0); |
1509 | delayacct_tsk_free(p); | 1502 | delayacct_tsk_free(p); |
1510 | module_put(task_thread_info(p)->exec_domain->module); | 1503 | module_put(task_thread_info(p)->exec_domain->module); |
1511 | bad_fork_cleanup_count: | 1504 | bad_fork_cleanup_count: |