Lines Matching refs:ops
43 struct fib_notifier_ops *ops; in fib_seq_sum() local
48 list_for_each_entry_rcu(ops, &fn_net->fib_notifier_ops, list) { in fib_seq_sum()
49 if (!try_module_get(ops->owner)) in fib_seq_sum()
51 fib_seq += ops->fib_seq_read(net); in fib_seq_sum()
52 module_put(ops->owner); in fib_seq_sum()
64 struct fib_notifier_ops *ops; in fib_net_dump() local
68 list_for_each_entry_rcu(ops, &fn_net->fib_notifier_ops, list) { in fib_net_dump()
69 if (!try_module_get(ops->owner)) in fib_net_dump()
71 err = ops->fib_dump(net, nb, extack); in fib_net_dump()
72 module_put(ops->owner); in fib_net_dump()
129 static int __fib_notifier_ops_register(struct fib_notifier_ops *ops, in __fib_notifier_ops_register() argument
136 if (ops->family == o->family) in __fib_notifier_ops_register()
138 list_add_tail_rcu(&ops->list, &fn_net->fib_notifier_ops); in __fib_notifier_ops_register()
145 struct fib_notifier_ops *ops; in fib_notifier_ops_register() local
148 ops = kmemdup(tmpl, sizeof(*ops), GFP_KERNEL); in fib_notifier_ops_register()
149 if (!ops) in fib_notifier_ops_register()
152 err = __fib_notifier_ops_register(ops, net); in fib_notifier_ops_register()
156 return ops; in fib_notifier_ops_register()
159 kfree(ops); in fib_notifier_ops_register()
164 void fib_notifier_ops_unregister(struct fib_notifier_ops *ops) in fib_notifier_ops_unregister() argument
166 list_del_rcu(&ops->list); in fib_notifier_ops_unregister()
167 kfree_rcu(ops, rcu); in fib_notifier_ops_unregister()