[Devel] [PATCH RHEL7 COMMIT] cgroup: un-export cgroup_kernel_* and zap cgroup_kernel_remove
Konstantin Khorenko
khorenko at virtuozzo.com
Thu Aug 11 02:41:44 PDT 2016
The commit is pushed to "branch-rh7-3.10.0-327.22.2.vz7.16.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-327.22.2.vz7.16.5
------>
commit 77cbcd5241713d292d5ce19e657b54db6e9e66d9
Author: Vladimir Davydov <vdavydov at virtuozzo.com>
Date: Thu Aug 11 13:41:44 2016 +0400
cgroup: un-export cgroup_kernel_* and zap cgroup_kernel_remove
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 <vdavydov at 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 730ca909..b34239d 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 581924e..1c047b9 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);
More information about the Devel
mailing list