After fairsched's gone, cgroup_kernel_remove is not used any more, so
drop it. cgroup_kernel_* family of functions are now used only by
beancounters, which is a part of the kernel, so un-export them.

Signed-off-by: Vladimir Davydov <vdavy...@virtuozzo.com>
---
 include/linux/cgroup.h |  1 -
 kernel/cgroup.c        | 26 --------------------------
 2 files changed, 27 deletions(-)

diff --git a/include/linux/cgroup.h b/include/linux/cgroup.h
index 730ca9091bfb..b34239dcdb52 100644
--- a/include/linux/cgroup.h
+++ b/include/linux/cgroup.h
@@ -55,7 +55,6 @@ struct cgroup *cgroup_kernel_lookup(struct vfsmount *mnt,
                                    const char *pathname);
 struct cgroup *cgroup_kernel_open(struct cgroup *parent,
                enum cgroup_open_flags flags, const char *name);
-int cgroup_kernel_remove(struct cgroup *parent, const char *name);
 int cgroup_kernel_attach(struct cgroup *cgrp, struct task_struct *tsk);
 void cgroup_kernel_close(struct cgroup *cgrp);
 
diff --git a/kernel/cgroup.c b/kernel/cgroup.c
index 581924e7af9e..1c047b9bb1fb 100644
--- a/kernel/cgroup.c
+++ b/kernel/cgroup.c
@@ -5669,13 +5669,11 @@ struct vfsmount *cgroup_kernel_mount(struct 
cgroup_sb_opts *opts)
 {
        return kern_mount_data(&cgroup_fs_type, opts);
 }
-EXPORT_SYMBOL(cgroup_kernel_mount);
 
 struct cgroup *cgroup_get_root(struct vfsmount *mnt)
 {
        return mnt->mnt_root->d_fsdata;
 }
-EXPORT_SYMBOL(cgroup_get_root);
 
 struct cgroup *cgroup_kernel_lookup(struct vfsmount *mnt,
                                    const char *pathname)
@@ -5698,7 +5696,6 @@ struct cgroup *cgroup_kernel_lookup(struct vfsmount *mnt,
        path_put(&path);
        return cgrp;
 }
-EXPORT_SYMBOL(cgroup_kernel_lookup);
 
 struct cgroup *cgroup_kernel_open(struct cgroup *parent,
                enum cgroup_open_flags flags, const char *name)
@@ -5729,27 +5726,6 @@ out:
        mutex_unlock(&parent->dentry->d_inode->i_mutex);
        return cgrp;
 }
-EXPORT_SYMBOL(cgroup_kernel_open);
-
-int cgroup_kernel_remove(struct cgroup *parent, const char *name)
-{
-       struct dentry *dentry;
-       int ret;
-
-       mutex_lock_nested(&parent->dentry->d_inode->i_mutex, I_MUTEX_PARENT);
-       dentry = lookup_one_len(name, parent->dentry, strlen(name));
-       ret = PTR_ERR(dentry);
-       if (IS_ERR(dentry))
-               goto out;
-       ret = -ENOENT;
-       if (dentry->d_inode)
-               ret = vfs_rmdir(parent->dentry->d_inode, dentry);
-       dput(dentry);
-out:
-       mutex_unlock(&parent->dentry->d_inode->i_mutex);
-       return ret;
-}
-EXPORT_SYMBOL(cgroup_kernel_remove);
 
 int cgroup_kernel_attach(struct cgroup *cgrp, struct task_struct *tsk)
 {
@@ -5761,7 +5737,6 @@ int cgroup_kernel_attach(struct cgroup *cgrp, struct 
task_struct *tsk)
        mutex_unlock(&cgroup_mutex);
        return ret;
 }
-EXPORT_SYMBOL(cgroup_kernel_attach);
 
 void cgroup_kernel_close(struct cgroup *cgrp)
 {
@@ -5770,4 +5745,3 @@ void cgroup_kernel_close(struct cgroup *cgrp)
                check_for_release(cgrp);
        }
 }
-EXPORT_SYMBOL(cgroup_kernel_close);
-- 
2.1.4

_______________________________________________
Devel mailing list
Devel@openvz.org
https://lists.openvz.org/mailman/listinfo/devel

Reply via email to