Lines Matching refs:ng
71 struct net_generic *ng; in net_alloc_generic() local
74 ng = kzalloc(generic_size, GFP_KERNEL); in net_alloc_generic()
75 if (ng) in net_alloc_generic()
76 ng->s.len = max_gen_ptrs; in net_alloc_generic()
78 return ng; in net_alloc_generic()
83 struct net_generic *ng, *old_ng; in net_assign_generic() local
94 ng = net_alloc_generic(); in net_assign_generic()
95 if (!ng) in net_assign_generic()
109 memcpy(&ng->ptr[MIN_PERNET_OPS_ID], &old_ng->ptr[MIN_PERNET_OPS_ID], in net_assign_generic()
111 ng->ptr[id] = data; in net_assign_generic()
113 rcu_assign_pointer(net->gen, ng); in net_assign_generic()
120 struct net_generic *ng; in ops_init() local
140 ng = rcu_dereference_protected(net->gen, in ops_init()
142 ng->ptr[*ops->id] = NULL; in ops_init()
404 struct net_generic *ng; in net_alloc() local
406 ng = net_alloc_generic(); in net_alloc()
407 if (!ng) in net_alloc()
421 rcu_assign_pointer(net->gen, ng); in net_alloc()
431 kfree(ng); in net_alloc()
1093 struct net_generic *ng; in net_ns_init() local
1106 ng = net_alloc_generic(); in net_ns_init()
1107 if (!ng) in net_ns_init()
1110 rcu_assign_pointer(init_net.gen, ng); in net_ns_init()