[Devel,v2,25/27] connector: containerize "connector" proc entry

Submitted by Stanislav Kinsburskiy on Aug. 17, 2017, 2:01 p.m.

Details

Message ID 20170817140108.23505.92164.stgit@localhost.localdomain
State New
Series "proc connector: containerize on per-VE basis"
Headers show

Commit Message

Stanislav Kinsburskiy Aug. 17, 2017, 2:01 p.m.
Needed to expose "/proc/net/connector" in CT and show right content.

Signed-off-by: Stanislav Kinsburskiy <skinsbursky@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;
 	}