diff options
author | Tejun Heo <tj@kernel.org> | 2012-11-05 09:16:59 -0800 |
---|---|---|
committer | Tejun Heo <tj@kernel.org> | 2012-11-05 09:16:59 -0800 |
commit | 976c06bcccc50573997609fa7ec842479bd96ffb (patch) | |
tree | 451f67b3cb6e4b3eb52a1df56d9018eb447960f1 /fs/ocfs2/buffer_head_io.h | |
parent | e93160803ffda2e67d9ff9cacb63bb6868c8398f (diff) |
cgroup: use cgroup_lock_live_group(parent) in cgroup_create()
This patch makes cgroup_create() fail if @parent is marked removed.
This is to prepare for further updates to cgroup_rmdir() path.
Note that this change isn't strictly necessary. cgroup can only be
created via mkdir and the removed marking and dentry removal happen
without releasing cgroup_mutex, so cgroup_create() can never race with
cgroup_rmdir(). Even after the scheduled updates to cgroup_rmdir(),
cgroup_mkdir() and cgroup_rmdir() are synchronized by i_mutex
rendering the added liveliness check unnecessary.
Do it anyway such that locking is contained inside cgroup proper and
we don't get nasty surprises if we ever grow another caller of
cgroup_create().
Signed-off-by: Tejun Heo <tj@kernel.org>
Reviewed-by: Michal Hocko <mhocko@suse.cz>
Reviewed-by: KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>
Acked-by: Li Zefan <lizefan@huawei.com>
Diffstat (limited to 'fs/ocfs2/buffer_head_io.h')
0 files changed, 0 insertions, 0 deletions