[Devel,RHEL7,COMMIT] connector: containerize "connector" proc entry

Submitted by Konstantin Khorenko on Aug. 31, 2017, 2:40 p.m.

Details

Message ID 201708311440.v7VEehXN016495@finist_ce7.work
State New
Series "proc connector: containerize on per-VE basis"
Headers show

Commit Message

Konstantin Khorenko Aug. 31, 2017, 2:40 p.m.
The commit is pushed to "branch-rh7-3.10.0-514.26.1.vz7.35.x-ovz" and will appear at https://src.openvz.org/scm/ovz/vzkernel.git
after rh7-3.10.0-514.26.1.vz7.35.5
------>
commit 2100a680437f0c26d65ab4e304cc274399ccbcf3
Author: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
Date:   Thu Aug 31 17:40:43 2017 +0300

    connector: containerize "connector" proc entry
    
    Needed to expose "/proc/net/connector" in CT and show right content.
    
    Signed-off-by: Stanislav Kinsburskiy <skinsbursky@virtuozzo.com>
    Reviewed-by: Andrey Ryabinin <aryabinin@virtuozzo.com>
---
 drivers/connector/connector.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Patch hide | download patch | download mbox

diff --git a/drivers/connector/connector.c b/drivers/connector/connector.c
index 59d81a3..771dadf 100644
--- a/drivers/connector/connector.c
+++ b/drivers/connector/connector.c
@@ -241,7 +241,7 @@  EXPORT_SYMBOL_GPL(cn_del_callback);
 
 static int cn_proc_show(struct seq_file *m, void *v)
 {
-	struct cn_queue_dev *dev = get_cdev(get_ve0())->cbdev;
+	struct cn_queue_dev *dev = get_cdev(get_exec_env())->cbdev;
 	struct cn_callback_entry *cbq;
 
 	seq_printf(m, "Name            ID\n");
@@ -303,7 +303,7 @@  static int cn_init_ve(struct ve_struct *ve)
 
 	ve->cn->cn_already_initialized = 1;
 
-	if (!proc_create("connector", S_IRUGO, net->proc_net, &cn_file_ops)) {
+	if (!proc_net_create("connector", S_IRUGO, net->proc_net, &cn_file_ops)) {
 		err = -ENOMEM;
 		goto free_cdev;
 	}