]> git.openfabrics.org - ~emulex/compat-rdma.git/commitdiff
BACKPORT ucma: Revert sysctl registrations
authorVladimir Sokolovsky <vlad@mellanox.com>
Thu, 12 Jul 2012 21:29:35 +0000 (00:29 +0300)
committerVladimir Sokolovsky <vlad@mellanox.com>
Thu, 12 Jul 2012 21:29:35 +0000 (00:29 +0300)
Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
patches/0007-BACKPORT-ucma-Revert-sysctl-registrations.patch [new file with mode: 0644]

diff --git a/patches/0007-BACKPORT-ucma-Revert-sysctl-registrations.patch b/patches/0007-BACKPORT-ucma-Revert-sysctl-registrations.patch
new file mode 100644 (file)
index 0000000..7a6d172
--- /dev/null
@@ -0,0 +1,48 @@
+From 9ccb05fe619154aa63a787fa1bd561b5992264c3 Mon Sep 17 00:00:00 2001
+From: Vladimir Sokolovsky <vlad@mellanox.com>
+Date: Fri, 13 Jul 2012 00:24:56 +0300
+Subject: [PATCH] BACKPORT ucma: Revert sysctl registrations
+
+Signed-off-by: Vladimir Sokolovsky <vlad@mellanox.com>
+---
+ drivers/infiniband/core/ucma.c |   10 ++++++++--
+ 1 files changed, 8 insertions(+), 2 deletions(-)
+
+diff --git a/drivers/infiniband/core/ucma.c b/drivers/infiniband/core/ucma.c
+index 8002ae6..5861cdb 100644
+--- a/drivers/infiniband/core/ucma.c
++++ b/drivers/infiniband/core/ucma.c
+@@ -66,6 +66,12 @@ static ctl_table ucma_ctl_table[] = {
+       { }
+ };
++static struct ctl_path ucma_ctl_path[] = {
++      { .procname = "net" },
++      { .procname = "rdma_ucm" },
++      { }
++};
++
+ struct ucma_file {
+       struct mutex            mut;
+       struct file             *filp;
+@@ -1386,7 +1392,7 @@ static int __init ucma_init(void)
+               goto err1;
+       }
+-      ucma_ctl_table_hdr = register_net_sysctl(&init_net, "net/rdma_ucm", ucma_ctl_table);
++      ucma_ctl_table_hdr = register_sysctl_paths(ucma_ctl_path, ucma_ctl_table);
+       if (!ucma_ctl_table_hdr) {
+               printk(KERN_ERR "rdma_ucm: couldn't register sysctl paths\n");
+               ret = -ENOMEM;
+@@ -1402,7 +1408,7 @@ err1:
+ static void __exit ucma_cleanup(void)
+ {
+-      unregister_net_sysctl_table(ucma_ctl_table_hdr);
++      unregister_sysctl_table(ucma_ctl_table_hdr);
+       device_remove_file(ucma_misc.this_device, &dev_attr_abi_version);
+       misc_deregister(&ucma_misc);
+       idr_destroy(&ctx_idr);
+-- 
+1.7.1
+