Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b36824c7 authored by Tejun Heo's avatar Tejun Heo
Browse files

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: default avatarTejun Heo <tj@kernel.org>
Acked-by: default avatarLi Zefan <lizefan@huawei.com>
Acked-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
parent 3bc942f3
Loading
Loading
Loading
Loading
+0 −5
Original line number Diff line number Diff line
@@ -883,11 +883,6 @@ unsigned short css_id(struct cgroup_subsys_state *css);
struct cgroup_subsys_state *css_from_dir(struct dentry *dentry,
					 struct cgroup_subsys *ss);

/* XXX: temporary */
struct cgroup_subsys_state *cgroup_css(struct cgroup *cgrp,
				       struct cgroup_subsys *ss);
struct cftype *__file_cft(struct file *file);

#else /* !CONFIG_CGROUPS */

static inline int cgroup_init_early(void) { return 0; }
+2 −12
Original line number Diff line number Diff line
@@ -202,7 +202,7 @@ static int cgroup_addrm_files(struct cgroup *cgrp, struct cftype cfts[],
 * keep accessing it outside the said locks.  This function may return
 * %NULL if @cgrp doesn't have @subsys_id enabled.
 */
struct cgroup_subsys_state *cgroup_css(struct cgroup *cgrp,
static struct cgroup_subsys_state *cgroup_css(struct cgroup *cgrp,
					      struct cgroup_subsys *ss)
{
	if (ss)
@@ -2625,16 +2625,6 @@ static const struct inode_operations cgroup_dir_inode_operations = {
	.removexattr = cgroup_removexattr,
};

/*
 * Check if a file is a control file
 */
struct cftype *__file_cft(struct file *file)
{
	if (file_inode(file)->i_fop != &cgroup_file_operations)
		return ERR_PTR(-EINVAL);
	return __d_cft(file->f_dentry);
}

static int cgroup_create_file(struct dentry *dentry, umode_t mode,
				struct super_block *sb)
{