Skip to content

Commit b36824c

Browse files
committed
cgroup: unexport cgroup_css() and remove __file_cft()
Now that cgroup_event is made memcg specific, the temporarily exported functions are no longer necessary. Unexport cgroup_css() and remove __file_cft() which doesn't have any user left. 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>
1 parent 3bc942f commit b36824c

2 files changed

Lines changed: 2 additions & 17 deletions

File tree

‎include/linux/cgroup.h‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -883,11 +883,6 @@ unsigned short css_id(struct cgroup_subsys_state *css);
883883
struct cgroup_subsys_state *css_from_dir(struct dentry *dentry,
884884
struct cgroup_subsys *ss);
885885

886-
/* XXX: temporary */
887-
struct cgroup_subsys_state *cgroup_css(struct cgroup *cgrp,
888-
struct cgroup_subsys *ss);
889-
struct cftype *__file_cft(struct file *file);
890-
891886
#else /* !CONFIG_CGROUPS */
892887

893888
static inline int cgroup_init_early(void) { return 0; }

‎kernel/cgroup.c‎

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -202,8 +202,8 @@ static int cgroup_addrm_files(struct cgroup *cgrp, struct cftype cfts[],
202202
* keep accessing it outside the said locks. This function may return
203203
* %NULL if @cgrp doesn't have @subsys_id enabled.
204204
*/
205-
struct cgroup_subsys_state *cgroup_css(struct cgroup *cgrp,
206-
struct cgroup_subsys *ss)
205+
static struct cgroup_subsys_state *cgroup_css(struct cgroup *cgrp,
206+
struct cgroup_subsys *ss)
207207
{
208208
if (ss)
209209
return rcu_dereference_check(cgrp->subsys[ss->subsys_id],
@@ -2625,16 +2625,6 @@ static const struct inode_operations cgroup_dir_inode_operations = {
26252625
.removexattr = cgroup_removexattr,
26262626
};
26272627

2628-
/*
2629-
* Check if a file is a control file
2630-
*/
2631-
struct cftype *__file_cft(struct file *file)
2632-
{
2633-
if (file_inode(file)->i_fop != &cgroup_file_operations)
2634-
return ERR_PTR(-EINVAL);
2635-
return __d_cft(file->f_dentry);
2636-
}
2637-
26382628
static int cgroup_create_file(struct dentry *dentry, umode_t mode,
26392629
struct super_block *sb)
26402630
{

0 commit comments

Comments
 (0)