Lines Matching refs:net
67 static int __net_init afs_net_init(struct net *net_ns) in afs_net_init()
70 struct afs_net *net = afs_net(net_ns); in afs_net_init() local
73 net->net = net_ns; in afs_net_init()
74 net->live = true; in afs_net_init()
75 generate_random_uuid((unsigned char *)&net->uuid); in afs_net_init()
77 INIT_WORK(&net->charge_preallocation_work, afs_charge_preallocation); in afs_net_init()
78 mutex_init(&net->socket_mutex); in afs_net_init()
80 net->cells = RB_ROOT; in afs_net_init()
81 init_rwsem(&net->cells_lock); in afs_net_init()
82 INIT_WORK(&net->cells_manager, afs_manage_cells); in afs_net_init()
83 timer_setup(&net->cells_timer, afs_cells_timer, 0); in afs_net_init()
85 mutex_init(&net->cells_alias_lock); in afs_net_init()
86 mutex_init(&net->proc_cells_lock); in afs_net_init()
87 INIT_HLIST_HEAD(&net->proc_cells); in afs_net_init()
89 seqlock_init(&net->fs_lock); in afs_net_init()
90 net->fs_servers = RB_ROOT; in afs_net_init()
91 INIT_LIST_HEAD(&net->fs_probe_fast); in afs_net_init()
92 INIT_LIST_HEAD(&net->fs_probe_slow); in afs_net_init()
93 INIT_HLIST_HEAD(&net->fs_proc); in afs_net_init()
95 INIT_HLIST_HEAD(&net->fs_addresses4); in afs_net_init()
96 INIT_HLIST_HEAD(&net->fs_addresses6); in afs_net_init()
97 seqlock_init(&net->fs_addr_lock); in afs_net_init()
99 INIT_WORK(&net->fs_manager, afs_manage_servers); in afs_net_init()
100 timer_setup(&net->fs_timer, afs_servers_timer, 0); in afs_net_init()
101 INIT_WORK(&net->fs_prober, afs_fs_probe_dispatcher); in afs_net_init()
102 timer_setup(&net->fs_probe_timer, afs_fs_probe_timer, 0); in afs_net_init()
103 atomic_set(&net->servers_outstanding, 1); in afs_net_init()
112 net->sysnames = sysnames; in afs_net_init()
113 rwlock_init(&net->sysnames_lock); in afs_net_init()
116 ret = afs_proc_init(net); in afs_net_init()
121 ret = afs_cell_init(net, rootcell); in afs_net_init()
126 ret = afs_open_socket(net); in afs_net_init()
133 net->live = false; in afs_net_init()
134 afs_fs_probe_cleanup(net); in afs_net_init()
135 afs_cell_purge(net); in afs_net_init()
136 afs_purge_servers(net); in afs_net_init()
138 net->live = false; in afs_net_init()
139 afs_proc_cleanup(net); in afs_net_init()
141 afs_put_sysnames(net->sysnames); in afs_net_init()
143 net->live = false; in afs_net_init()
150 static void __net_exit afs_net_exit(struct net *net_ns) in afs_net_exit()
152 struct afs_net *net = afs_net(net_ns); in afs_net_exit() local
154 net->live = false; in afs_net_exit()
155 afs_fs_probe_cleanup(net); in afs_net_exit()
156 afs_cell_purge(net); in afs_net_exit()
157 afs_purge_servers(net); in afs_net_exit()
158 afs_close_socket(net); in afs_net_exit()
159 afs_proc_cleanup(net); in afs_net_exit()
160 afs_put_sysnames(net->sysnames); in afs_net_exit()