netfilter: replace list_head with single linked list
[cascardo/linux.git] / net / netfilter / nfnetlink_queue.c
index 7caa8b0..af832c5 100644 (file)
@@ -917,12 +917,14 @@ static struct notifier_block nfqnl_dev_notifier = {
        .notifier_call  = nfqnl_rcv_dev_event,
 };
 
-static int nf_hook_cmp(struct nf_queue_entry *entry, unsigned long ops_ptr)
+static int nf_hook_cmp(struct nf_queue_entry *entry, unsigned long entry_ptr)
 {
-       return entry->elem == (struct nf_hook_ops *)ops_ptr;
+       return rcu_access_pointer(entry->state.hook_entries) ==
+               (struct nf_hook_entry *)entry_ptr;
 }
 
-static void nfqnl_nf_hook_drop(struct net *net, struct nf_hook_ops *hook)
+static void nfqnl_nf_hook_drop(struct net *net,
+                              const struct nf_hook_entry *hook)
 {
        struct nfnl_queue_net *q = nfnl_queue_pernet(net);
        int i;