Skip to content

Commit

Permalink
cgroup: relocate __d_cgrp() and __d_cft()
Browse files Browse the repository at this point in the history
Move the two macros upwards as they'll be used earlier in the file.

Signed-off-by: Tejun Heo <tj@kernel.org>
Acked-by: Li Zefan <lizf@cn.fujitsu.com>
  • Loading branch information
Tejun Heo committed Apr 1, 2012
1 parent db0416b commit f6ea937
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions kernel/cgroup.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,16 @@ list_for_each_entry(_ss, &_root->subsys_list, sibling)
#define for_each_active_root(_root) \
list_for_each_entry(_root, &roots, root_list)

static inline struct cgroup *__d_cgrp(struct dentry *dentry)
{
return dentry->d_fsdata;
}

static inline struct cftype *__d_cft(struct dentry *dentry)
{
return dentry->d_fsdata;
}

/* the list of cgroups eligible for automatic release. Protected by
* release_list_lock */
static LIST_HEAD(release_list);
Expand Down Expand Up @@ -1704,16 +1714,6 @@ static struct file_system_type cgroup_fs_type = {

static struct kobject *cgroup_kobj;

static inline struct cgroup *__d_cgrp(struct dentry *dentry)
{
return dentry->d_fsdata;
}

static inline struct cftype *__d_cft(struct dentry *dentry)
{
return dentry->d_fsdata;
}

/**
* cgroup_path - generate the path of a cgroup
* @cgrp: the cgroup in question
Expand Down

0 comments on commit f6ea937

Please sign in to comment.