summaryrefslogtreecommitdiff
path: root/net/smc/af_smc.c
diff options
context:
space:
mode:
Diffstat (limited to 'net/smc/af_smc.c')
-rw-r--r--net/smc/af_smc.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/net/smc/af_smc.c b/net/smc/af_smc.c
index 50492ee495ce..8b059b2fc34d 100644
--- a/net/smc/af_smc.c
+++ b/net/smc/af_smc.c
@@ -21,6 +21,7 @@
#include "smc.h"
#include "smc_ib.h"
+#include "smc_pnet.h"
static void smc_set_keepalive(struct sock *sk, int val)
{
@@ -586,10 +587,14 @@ static int __init smc_init(void)
{
int rc;
+ rc = smc_pnet_init();
+ if (rc)
+ return rc;
+
rc = proto_register(&smc_proto, 1);
if (rc) {
pr_err("%s: proto_register fails with %d\n", __func__, rc);
- goto out;
+ goto out_pnet;
}
rc = sock_register(&smc_sock_family_ops);
@@ -610,7 +615,8 @@ out_sock:
sock_unregister(PF_SMC);
out_proto:
proto_unregister(&smc_proto);
-out:
+out_pnet:
+ smc_pnet_exit();
return rc;
}
@@ -619,6 +625,7 @@ static void __exit smc_exit(void)
smc_ib_unregister_client();
sock_unregister(PF_SMC);
proto_unregister(&smc_proto);
+ smc_pnet_exit();
}
module_init(smc_init);