Commit eb806aef authored by David S. Miller's avatar David S. Miller Committed by Greg Kroah-Hartman

Revert "tipc: fix modprobe tipc failed after switch order of device registration"

commit 5593530e upstream.

This reverts commit 532b0f7e.

More revisions coming up.
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent fb6c64e7
...@@ -66,10 +66,6 @@ static int __net_init tipc_init_net(struct net *net) ...@@ -66,10 +66,6 @@ static int __net_init tipc_init_net(struct net *net)
INIT_LIST_HEAD(&tn->node_list); INIT_LIST_HEAD(&tn->node_list);
spin_lock_init(&tn->node_list_lock); spin_lock_init(&tn->node_list_lock);
err = tipc_socket_init();
if (err)
goto out_socket;
err = tipc_sk_rht_init(net); err = tipc_sk_rht_init(net);
if (err) if (err)
goto out_sk_rht; goto out_sk_rht;
...@@ -96,8 +92,6 @@ static int __net_init tipc_init_net(struct net *net) ...@@ -96,8 +92,6 @@ static int __net_init tipc_init_net(struct net *net)
out_nametbl: out_nametbl:
tipc_sk_rht_destroy(net); tipc_sk_rht_destroy(net);
out_sk_rht: out_sk_rht:
tipc_socket_stop();
out_socket:
return err; return err;
} }
...@@ -108,7 +102,6 @@ static void __net_exit tipc_exit_net(struct net *net) ...@@ -108,7 +102,6 @@ static void __net_exit tipc_exit_net(struct net *net)
tipc_bcast_stop(net); tipc_bcast_stop(net);
tipc_nametbl_stop(net); tipc_nametbl_stop(net);
tipc_sk_rht_destroy(net); tipc_sk_rht_destroy(net);
tipc_socket_stop();
} }
static struct pernet_operations tipc_net_ops = { static struct pernet_operations tipc_net_ops = {
...@@ -144,6 +137,10 @@ static int __init tipc_init(void) ...@@ -144,6 +137,10 @@ static int __init tipc_init(void)
if (err) if (err)
goto out_pernet; goto out_pernet;
err = tipc_socket_init();
if (err)
goto out_socket;
err = tipc_bearer_setup(); err = tipc_bearer_setup();
if (err) if (err)
goto out_bearer; goto out_bearer;
...@@ -151,6 +148,8 @@ static int __init tipc_init(void) ...@@ -151,6 +148,8 @@ static int __init tipc_init(void)
pr_info("Started in single node mode\n"); pr_info("Started in single node mode\n");
return 0; return 0;
out_bearer: out_bearer:
tipc_socket_stop();
out_socket:
unregister_pernet_subsys(&tipc_net_ops); unregister_pernet_subsys(&tipc_net_ops);
out_pernet: out_pernet:
tipc_unregister_sysctl(); tipc_unregister_sysctl();
...@@ -166,6 +165,7 @@ static int __init tipc_init(void) ...@@ -166,6 +165,7 @@ static int __init tipc_init(void)
static void __exit tipc_exit(void) static void __exit tipc_exit(void)
{ {
tipc_bearer_cleanup(); tipc_bearer_cleanup();
tipc_socket_stop();
unregister_pernet_subsys(&tipc_net_ops); unregister_pernet_subsys(&tipc_net_ops);
tipc_netlink_stop(); tipc_netlink_stop();
tipc_netlink_compat_stop(); tipc_netlink_compat_stop();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment