Lines Matching full:net
65 static int __net_init afs_net_init(struct net *net_ns) in afs_net_init()
68 struct afs_net *net = afs_net(net_ns); in afs_net_init() local
71 net->net = net_ns; in afs_net_init()
72 net->live = true; in afs_net_init()
73 generate_random_uuid((unsigned char *)&net->uuid); in afs_net_init()
75 INIT_WORK(&net->charge_preallocation_work, afs_charge_preallocation); in afs_net_init()
76 mutex_init(&net->socket_mutex); in afs_net_init()
78 net->cells = RB_ROOT; in afs_net_init()
79 init_rwsem(&net->cells_lock); in afs_net_init()
80 INIT_WORK(&net->cells_manager, afs_manage_cells); in afs_net_init()
81 timer_setup(&net->cells_timer, afs_cells_timer, 0); in afs_net_init()
83 mutex_init(&net->cells_alias_lock); in afs_net_init()
84 mutex_init(&net->proc_cells_lock); in afs_net_init()
85 INIT_HLIST_HEAD(&net->proc_cells); in afs_net_init()
87 seqlock_init(&net->fs_lock); in afs_net_init()
88 net->fs_servers = RB_ROOT; in afs_net_init()
89 INIT_LIST_HEAD(&net->fs_probe_fast); in afs_net_init()
90 INIT_LIST_HEAD(&net->fs_probe_slow); in afs_net_init()
91 INIT_HLIST_HEAD(&net->fs_proc); in afs_net_init()
93 INIT_HLIST_HEAD(&net->fs_addresses); in afs_net_init()
94 seqlock_init(&net->fs_addr_lock); in afs_net_init()
96 INIT_WORK(&net->fs_manager, afs_manage_servers); in afs_net_init()
97 timer_setup(&net->fs_timer, afs_servers_timer, 0); in afs_net_init()
98 INIT_WORK(&net->fs_prober, afs_fs_probe_dispatcher); in afs_net_init()
99 timer_setup(&net->fs_probe_timer, afs_fs_probe_timer, 0); in afs_net_init()
100 atomic_set(&net->servers_outstanding, 1); in afs_net_init()
109 net->sysnames = sysnames; in afs_net_init()
110 rwlock_init(&net->sysnames_lock); in afs_net_init()
113 ret = afs_proc_init(net); in afs_net_init()
118 ret = afs_cell_init(net, rootcell); in afs_net_init()
123 ret = afs_open_socket(net); in afs_net_init()
130 net->live = false; in afs_net_init()
131 afs_fs_probe_cleanup(net); in afs_net_init()
132 afs_cell_purge(net); in afs_net_init()
133 afs_purge_servers(net); in afs_net_init()
135 net->live = false; in afs_net_init()
136 afs_proc_cleanup(net); in afs_net_init()
138 afs_put_sysnames(net->sysnames); in afs_net_init()
140 net->live = false; in afs_net_init()
147 static void __net_exit afs_net_exit(struct net *net_ns) in afs_net_exit()
149 struct afs_net *net = afs_net(net_ns); in afs_net_exit() local
151 net->live = false; in afs_net_exit()
152 afs_fs_probe_cleanup(net); in afs_net_exit()
153 afs_cell_purge(net); in afs_net_exit()
154 afs_purge_servers(net); in afs_net_exit()
155 afs_close_socket(net); in afs_net_exit()
156 afs_proc_cleanup(net); in afs_net_exit()
157 afs_put_sysnames(net->sysnames); in afs_net_exit()
158 kfree_rcu(rcu_access_pointer(net->address_prefs), rcu); in afs_net_exit()
196 afs_proc_symlink = proc_symlink("fs/afs", NULL, "../self/net/afs"); in afs_init()
223 late_initcall(afs_init); /* must be called after net/ to create socket */