mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-01-13 08:39:52 +00:00
cgroup: relocate __d_cgrp() and __d_cft()
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>
This commit is contained in:
parent
db0416b649
commit
f6ea93723d
@ -282,6 +282,16 @@ list_for_each_entry(_ss, &_root->subsys_list, sibling)
|
|||||||
#define for_each_active_root(_root) \
|
#define for_each_active_root(_root) \
|
||||||
list_for_each_entry(_root, &roots, root_list)
|
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
|
/* the list of cgroups eligible for automatic release. Protected by
|
||||||
* release_list_lock */
|
* release_list_lock */
|
||||||
static LIST_HEAD(release_list);
|
static LIST_HEAD(release_list);
|
||||||
@ -1704,16 +1714,6 @@ static struct file_system_type cgroup_fs_type = {
|
|||||||
|
|
||||||
static struct kobject *cgroup_kobj;
|
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
|
* cgroup_path - generate the path of a cgroup
|
||||||
* @cgrp: the cgroup in question
|
* @cgrp: the cgroup in question
|
||||||
|
Loading…
x
Reference in New Issue
Block a user