aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTejun Heo <tj@kernel.org>2013-11-22 18:20:44 -0500
committerTejun Heo <tj@kernel.org>2013-11-22 18:20:44 -0500
commitb36824c75c7855585d6476eef2b234f6e0e68872 (patch)
treec966d0ff0a2f82bd0fb8296d65292e852bc6a77c
parent3bc942f372af383f49d56aab599469561a5e39ec (diff)
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>
-rw-r--r--include/linux/cgroup.h5
-rw-r--r--kernel/cgroup.c14
2 files changed, 2 insertions, 17 deletions
diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 612adc5b87c5..8d9fa8967c9e 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -883,11 +883,6 @@ unsigned short css_id(struct cgroup_subsys_state *css);
883struct cgroup_subsys_state *css_from_dir(struct dentry *dentry, 883struct cgroup_subsys_state *css_from_dir(struct dentry *dentry,
884 struct cgroup_subsys *ss); 884 struct cgroup_subsys *ss);
885 885
886/* XXX: temporary */
887struct cgroup_subsys_state *cgroup_css(struct cgroup *cgrp,
888 struct cgroup_subsys *ss);
889struct cftype *__file_cft(struct file *file);
890
891#else /* !CONFIG_CGROUPS */ 886#else /* !CONFIG_CGROUPS */
892 887
893static inline int cgroup_init_early(void) { return 0; } 888static inline int cgroup_init_early(void) { return 0; }
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index feda7c54fa6b..c0248e16461d 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -202,8 +202,8 @@ static int cgroup_addrm_files(struct cgroup *cgrp, struct cftype cfts[],
202 * keep accessing it outside the said locks. This function may return 202 * keep accessing it outside the said locks. This function may return
203 * %NULL if @cgrp doesn't have @subsys_id enabled. 203 * %NULL if @cgrp doesn't have @subsys_id enabled.
204 */ 204 */
205struct cgroup_subsys_state *cgroup_css(struct cgroup *cgrp, 205static struct cgroup_subsys_state *cgroup_css(struct cgroup *cgrp,
206 struct cgroup_subsys *ss) 206 struct cgroup_subsys *ss)
207{ 207{
208 if (ss) 208 if (ss)
209 return rcu_dereference_check(cgrp->subsys[ss->subsys_id], 209 return rcu_dereference_check(cgrp->subsys[ss->subsys_id],
@@ -2625,16 +2625,6 @@ static const struct inode_operations cgroup_dir_inode_operations = {
2625 .removexattr = cgroup_removexattr, 2625 .removexattr = cgroup_removexattr,
2626}; 2626};
2627 2627
2628/*
2629 * Check if a file is a control file
2630 */
2631struct 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
2638static int cgroup_create_file(struct dentry *dentry, umode_t mode, 2628static int cgroup_create_file(struct dentry *dentry, umode_t mode,
2639 struct super_block *sb) 2629 struct super_block *sb)
2640{ 2630{