From: Tejun Heo Date: Fri, 9 Aug 2013 00:11:23 +0000 (-0400) Subject: cgroup: pin cgroup_subsys_state when opening a cgroupfs file X-Git-Tag: v3.12-rc1~173^2~39 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f7d58818ba4249f04a83b73aaac135640050bb4f;p=pandora-kernel.git cgroup: pin cgroup_subsys_state when opening a cgroupfs file Previously, each file read/write operation relied on the inode reference count pinning the cgroup and simply checked whether the cgroup was marked dead before proceeding to invoke the per-subsystem callback. This was rather silly as it didn't have any synchronization or css pinning around the check and the cgroup may be removed and all css refs drained between the DEAD check and actual method invocation. This patch pins the css between open() and release() so that it is guaranteed to be alive for all file operations and remove the silly DEAD checks from cgroup_file_read/write(). Signed-off-by: Tejun Heo Acked-by: Li Zefan --- Reading git-diff-tree failed