summaryrefslogtreecommitdiff
path: root/kernel/events
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-08-27 02:40:56 +0400
committerTejun Heo <tj@kernel.org>2013-08-27 02:40:56 +0400
commit35cf083619da5677f83e9a8eae813f0b413d7082 (patch)
tree509ea1ae09644bc82040ec919fa94c928e98db27 /kernel/events
parent6e6eab0efdf48fb2d8d7aee904d7740acb4661c6 (diff)
downloadlinux-35cf083619da5677f83e9a8eae813f0b413d7082.tar.xz
cgroup: rename cgroup_css_from_dir() to css_from_dir() and update its syntax
cgroup_css_from_dir() will grow another user. In preparation, make the following changes. * All css functions are prefixed with just "css_", rename it to css_from_dir(). * Take dentry * instead of file * as dentry is what ultimately identifies a cgroup and file may not always be available. Note that the function now checkes whether @dentry->d_inode is NULL as the caller now may specify a negative dentry. * Make it take cgroup_subsys * instead of integer subsys_id. This simplifies the function and allows specifying no subsystem for cgroup->dummy_css. * Make return section a bit less verbose. This patch doesn't introduce any behavior changes. Signed-off-by: Tejun Heo <tj@kernel.org> Acked-by: Li Zefan <lizefan@huawei.com> Acked-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: Frederic Weisbecker <fweisbec@gmail.com> Cc: Ingo Molnar <mingo@redhat.com>
Diffstat (limited to 'kernel/events')
-rw-r--r--kernel/events/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/kernel/events/core.c b/kernel/events/core.c
index 23261f957713..b59ab6632f30 100644
--- a/kernel/events/core.c
+++ b/kernel/events/core.c
@@ -593,7 +593,7 @@ static inline int perf_cgroup_connect(int fd, struct perf_event *event,
rcu_read_lock();
- css = cgroup_css_from_dir(f.file, perf_subsys_id);
+ css = css_from_dir(f.file->f_dentry, &perf_subsys);
if (IS_ERR(css)) {
ret = PTR_ERR(css);
goto out;