[Devel] [PATCH RHEL7 COMMIT] ve: zap __find_ve_by_id

Konstantin Khorenko khorenko at virtuozzo.com
Thu Jun 4 06:07:06 PDT 2015


The commit is pushed to "branch-rh7-3.10.0-123.1.2-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-123.1.2.vz7.5.9
------>
commit 2046a1f14c46247f4bb7d03d4c9640ddcaae0cff
Author: Vladimir Davydov <vdavydov at parallels.com>
Date:   Thu Jun 4 17:07:06 2015 +0400

    ve: zap __find_ve_by_id
    
    This function is only used in get_ve_by_id. Inline it.
    
    Signed-off-by: Vladimir Davydov <vdavydov at parallels.com>
---
 include/linux/ve_proto.h | 1 -
 kernel/ve/ve.c           | 8 +-------
 2 files changed, 1 insertion(+), 8 deletions(-)

diff --git a/include/linux/ve_proto.h b/include/linux/ve_proto.h
index d491ab0..3206dd8 100644
--- a/include/linux/ve_proto.h
+++ b/include/linux/ve_proto.h
@@ -61,7 +61,6 @@ extern struct list_head ve_list_head;
 #define for_each_ve(ve)	list_for_each_entry((ve), &ve_list_head, ve_list)
 extern struct mutex ve_list_lock;
 extern struct ve_struct *get_ve_by_id(envid_t);
-extern struct ve_struct *__find_ve_by_id(envid_t);
 extern struct cgroup *ve_cgroup_open(struct cgroup *root, int flags, envid_t veid);
 extern int ve_cgroup_remove(struct cgroup *root, envid_t veid);
 
diff --git a/kernel/ve/ve.c b/kernel/ve/ve.c
index 55b7d86..c381208 100644
--- a/kernel/ve/ve.c
+++ b/kernel/ve/ve.c
@@ -219,17 +219,11 @@ const char *task_ve_name(struct task_struct *task)
 }
 EXPORT_SYMBOL(task_ve_name);
 
-struct ve_struct *__find_ve_by_id(envid_t veid)
-{
-	return idr_find(&ve_idr, veid);
-}
-EXPORT_SYMBOL(__find_ve_by_id);
-
 struct ve_struct *get_ve_by_id(envid_t veid)
 {
 	struct ve_struct *ve;
 	rcu_read_lock();
-	ve = __find_ve_by_id(veid);
+	ve = idr_find(&ve_idr, veid);
 	if (ve && !css_tryget(&ve->css))
 		ve = NULL;
 	rcu_read_unlock();



More information about the Devel mailing list