aboutsummaryrefslogtreecommitdiffstats
path: root/include/net
diff options
context:
space:
mode:
Diffstat (limited to 'include/net')
-rw-r--r--include/net/netfilter/nf_conntrack.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/include/net/netfilter/nf_conntrack.h b/include/net/netfilter/nf_conntrack.h
index b6f0905a4ee2..916013ca4a5c 100644
--- a/include/net/netfilter/nf_conntrack.h
+++ b/include/net/netfilter/nf_conntrack.h
@@ -300,29 +300,30 @@ DECLARE_PER_CPU(struct nf_conntrack_ecache, nf_conntrack_ecache);
300 300
301#define CONNTRACK_ECACHE(x) (__get_cpu_var(nf_conntrack_ecache).x) 301#define CONNTRACK_ECACHE(x) (__get_cpu_var(nf_conntrack_ecache).x)
302 302
303extern struct notifier_block *nf_conntrack_chain; 303extern struct atomic_notifier_head nf_conntrack_chain;
304extern struct notifier_block *nf_conntrack_expect_chain; 304extern struct atomic_notifier_head nf_conntrack_expect_chain;
305 305
306static inline int nf_conntrack_register_notifier(struct notifier_block *nb) 306static inline int nf_conntrack_register_notifier(struct notifier_block *nb)
307{ 307{
308 return notifier_chain_register(&nf_conntrack_chain, nb); 308 return atomic_notifier_chain_register(&nf_conntrack_chain, nb);
309} 309}
310 310
311static inline int nf_conntrack_unregister_notifier(struct notifier_block *nb) 311static inline int nf_conntrack_unregister_notifier(struct notifier_block *nb)
312{ 312{
313 return notifier_chain_unregister(&nf_conntrack_chain, nb); 313 return atomic_notifier_chain_unregister(&nf_conntrack_chain, nb);
314} 314}
315 315
316static inline int 316static inline int
317nf_conntrack_expect_register_notifier(struct notifier_block *nb) 317nf_conntrack_expect_register_notifier(struct notifier_block *nb)
318{ 318{
319 return notifier_chain_register(&nf_conntrack_expect_chain, nb); 319 return atomic_notifier_chain_register(&nf_conntrack_expect_chain, nb);
320} 320}
321 321
322static inline int 322static inline int
323nf_conntrack_expect_unregister_notifier(struct notifier_block *nb) 323nf_conntrack_expect_unregister_notifier(struct notifier_block *nb)
324{ 324{
325 return notifier_chain_unregister(&nf_conntrack_expect_chain, nb); 325 return atomic_notifier_chain_unregister(&nf_conntrack_expect_chain,
326 nb);
326} 327}
327 328
328extern void nf_ct_deliver_cached_events(const struct nf_conn *ct); 329extern void nf_ct_deliver_cached_events(const struct nf_conn *ct);
@@ -347,14 +348,14 @@ static inline void nf_conntrack_event(enum ip_conntrack_events event,
347 struct nf_conn *ct) 348 struct nf_conn *ct)
348{ 349{
349 if (nf_ct_is_confirmed(ct) && !nf_ct_is_dying(ct)) 350 if (nf_ct_is_confirmed(ct) && !nf_ct_is_dying(ct))
350 notifier_call_chain(&nf_conntrack_chain, event, ct); 351 atomic_notifier_call_chain(&nf_conntrack_chain, event, ct);
351} 352}
352 353
353static inline void 354static inline void
354nf_conntrack_expect_event(enum ip_conntrack_expect_events event, 355nf_conntrack_expect_event(enum ip_conntrack_expect_events event,
355 struct nf_conntrack_expect *exp) 356 struct nf_conntrack_expect *exp)
356{ 357{
357 notifier_call_chain(&nf_conntrack_expect_chain, event, exp); 358 atomic_notifier_call_chain(&nf_conntrack_expect_chain, event, exp);
358} 359}
359#else /* CONFIG_NF_CONNTRACK_EVENTS */ 360#else /* CONFIG_NF_CONNTRACK_EVENTS */
360static inline void nf_conntrack_event_cache(enum ip_conntrack_events event, 361static inline void nf_conntrack_event_cache(enum ip_conntrack_events event,