Commit 5593530e56943182ebb6d81eca8a3be6db6dbba4
1 parent
ac03046ece
Revert "tipc: fix modprobe tipc failed after switch order of device registration"
This reverts commit 532b0f7ece4cb2ffd24dc723ddf55242d1188e5e. More revisions coming up. Signed-off-by: David S. Miller <davem@davemloft.net>
Showing 1 changed file with 7 additions and 7 deletions Side-by-side Diff
net/tipc/core.c
... | ... | @@ -68,10 +68,6 @@ |
68 | 68 | INIT_LIST_HEAD(&tn->node_list); |
69 | 69 | spin_lock_init(&tn->node_list_lock); |
70 | 70 | |
71 | - err = tipc_socket_init(); | |
72 | - if (err) | |
73 | - goto out_socket; | |
74 | - | |
75 | 71 | err = tipc_sk_rht_init(net); |
76 | 72 | if (err) |
77 | 73 | goto out_sk_rht; |
... | ... | @@ -98,8 +94,6 @@ |
98 | 94 | out_nametbl: |
99 | 95 | tipc_sk_rht_destroy(net); |
100 | 96 | out_sk_rht: |
101 | - tipc_socket_stop(); | |
102 | -out_socket: | |
103 | 97 | return err; |
104 | 98 | } |
105 | 99 | |
... | ... | @@ -110,7 +104,6 @@ |
110 | 104 | tipc_bcast_stop(net); |
111 | 105 | tipc_nametbl_stop(net); |
112 | 106 | tipc_sk_rht_destroy(net); |
113 | - tipc_socket_stop(); | |
114 | 107 | } |
115 | 108 | |
116 | 109 | static struct pernet_operations tipc_net_ops = { |
... | ... | @@ -146,6 +139,10 @@ |
146 | 139 | if (err) |
147 | 140 | goto out_pernet; |
148 | 141 | |
142 | + err = tipc_socket_init(); | |
143 | + if (err) | |
144 | + goto out_socket; | |
145 | + | |
149 | 146 | err = tipc_bearer_setup(); |
150 | 147 | if (err) |
151 | 148 | goto out_bearer; |
... | ... | @@ -153,6 +150,8 @@ |
153 | 150 | pr_info("Started in single node mode\n"); |
154 | 151 | return 0; |
155 | 152 | out_bearer: |
153 | + tipc_socket_stop(); | |
154 | +out_socket: | |
156 | 155 | unregister_pernet_subsys(&tipc_net_ops); |
157 | 156 | out_pernet: |
158 | 157 | tipc_unregister_sysctl(); |
... | ... | @@ -168,6 +167,7 @@ |
168 | 167 | static void __exit tipc_exit(void) |
169 | 168 | { |
170 | 169 | tipc_bearer_cleanup(); |
170 | + tipc_socket_stop(); | |
171 | 171 | unregister_pernet_subsys(&tipc_net_ops); |
172 | 172 | tipc_netlink_stop(); |
173 | 173 | tipc_netlink_compat_stop(); |