Skip to content

Commit

Permalink
Revert "tipc: fix modprobe tipc failed after switch order of device r…
Browse files Browse the repository at this point in the history
…egistration"

This reverts commit 532b0f7.

More revisions coming up.

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed May 17, 2019
1 parent ac03046 commit 5593530
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions net/tipc/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ static int __net_init tipc_init_net(struct net *net)
INIT_LIST_HEAD(&tn->node_list);
spin_lock_init(&tn->node_list_lock);

err = tipc_socket_init();
if (err)
goto out_socket;

err = tipc_sk_rht_init(net);
if (err)
goto out_sk_rht;
Expand All @@ -98,8 +94,6 @@ static int __net_init tipc_init_net(struct net *net)
out_nametbl:
tipc_sk_rht_destroy(net);
out_sk_rht:
tipc_socket_stop();
out_socket:
return err;
}

Expand All @@ -110,7 +104,6 @@ static void __net_exit tipc_exit_net(struct net *net)
tipc_bcast_stop(net);
tipc_nametbl_stop(net);
tipc_sk_rht_destroy(net);
tipc_socket_stop();
}

static struct pernet_operations tipc_net_ops = {
Expand Down Expand Up @@ -146,13 +139,19 @@ static int __init tipc_init(void)
if (err)
goto out_pernet;

err = tipc_socket_init();
if (err)
goto out_socket;

err = tipc_bearer_setup();
if (err)
goto out_bearer;

pr_info("Started in single node mode\n");
return 0;
out_bearer:
tipc_socket_stop();
out_socket:
unregister_pernet_subsys(&tipc_net_ops);
out_pernet:
tipc_unregister_sysctl();
Expand All @@ -168,6 +167,7 @@ static int __init tipc_init(void)
static void __exit tipc_exit(void)
{
tipc_bearer_cleanup();
tipc_socket_stop();
unregister_pernet_subsys(&tipc_net_ops);
tipc_netlink_stop();
tipc_netlink_compat_stop();
Expand Down

0 comments on commit 5593530

Please sign in to comment.