Lines Matching refs:ng
72 struct net_generic *ng; in net_alloc_generic() local
75 ng = kzalloc(generic_size, GFP_KERNEL); in net_alloc_generic()
76 if (ng) in net_alloc_generic()
77 ng->s.len = max_gen_ptrs; in net_alloc_generic()
79 return ng; in net_alloc_generic()
84 struct net_generic *ng, *old_ng; in net_assign_generic() local
95 ng = net_alloc_generic(); in net_assign_generic()
96 if (!ng) in net_assign_generic()
110 memcpy(&ng->ptr[MIN_PERNET_OPS_ID], &old_ng->ptr[MIN_PERNET_OPS_ID], in net_assign_generic()
112 ng->ptr[id] = data; in net_assign_generic()
114 rcu_assign_pointer(net->gen, ng); in net_assign_generic()
121 struct net_generic *ng; in ops_init() local
141 ng = rcu_dereference_protected(net->gen, in ops_init()
143 ng->ptr[*ops->id] = NULL; in ops_init()
411 struct net_generic *ng; in net_alloc() local
413 ng = net_alloc_generic(); in net_alloc()
414 if (!ng) in net_alloc()
428 rcu_assign_pointer(net->gen, ng); in net_alloc()
438 kfree(ng); in net_alloc()
1104 struct net_generic *ng; in net_ns_init() local
1117 ng = net_alloc_generic(); in net_ns_init()
1118 if (!ng) in net_ns_init()
1121 rcu_assign_pointer(init_net.gen, ng); in net_ns_init()