[NETFILTER]: nf_conntrack_expect: function naming unification
[deliverable/linux.git] / net / ipv4 / netfilter / nf_conntrack_l3proto_ipv4_compat.c
index 89f933e810359d8d252e272b29ae22e3627702c1..12d6a6327b631b3143530add12a58f17a9a3d783 100644 (file)
@@ -41,35 +41,36 @@ struct ct_iter_state {
        unsigned int bucket;
 };
 
-static struct list_head *ct_get_first(struct seq_file *seq)
+static struct hlist_node *ct_get_first(struct seq_file *seq)
 {
        struct ct_iter_state *st = seq->private;
 
        for (st->bucket = 0;
             st->bucket < nf_conntrack_htable_size;
             st->bucket++) {
-               if (!list_empty(&nf_conntrack_hash[st->bucket]))
-                       return nf_conntrack_hash[st->bucket].next;
+               if (!hlist_empty(&nf_conntrack_hash[st->bucket]))
+                       return nf_conntrack_hash[st->bucket].first;
        }
        return NULL;
 }
 
-static struct list_head *ct_get_next(struct seq_file *seq, struct list_head *head)
+static struct hlist_node *ct_get_next(struct seq_file *seq,
+                                     struct hlist_node *head)
 {
        struct ct_iter_state *st = seq->private;
 
        head = head->next;
-       while (head == &nf_conntrack_hash[st->bucket]) {
+       while (head == NULL) {
                if (++st->bucket >= nf_conntrack_htable_size)
                        return NULL;
-               head = nf_conntrack_hash[st->bucket].next;
+               head = nf_conntrack_hash[st->bucket].first;
        }
        return head;
 }
 
-static struct list_head *ct_get_idx(struct seq_file *seq, loff_t pos)
+static struct hlist_node *ct_get_idx(struct seq_file *seq, loff_t pos)
 {
-       struct list_head *head = ct_get_first(seq);
+       struct hlist_node *head = ct_get_first(seq);
 
        if (head)
                while (pos && (head = ct_get_next(seq, head)))
@@ -208,7 +209,7 @@ static const struct file_operations ct_file_ops = {
 /* expects */
 static void *exp_seq_start(struct seq_file *s, loff_t *pos)
 {
-       struct list_head *e = &nf_conntrack_expect_list;
+       struct list_head *e = &nf_ct_expect_list;
        loff_t i;
 
        /* strange seq_file api calls stop even if we fail,
@@ -220,7 +221,7 @@ static void *exp_seq_start(struct seq_file *s, loff_t *pos)
 
        for (i = 0; i <= *pos; i++) {
                e = e->next;
-               if (e == &nf_conntrack_expect_list)
+               if (e == &nf_ct_expect_list)
                        return NULL;
        }
        return e;
@@ -233,7 +234,7 @@ static void *exp_seq_next(struct seq_file *s, void *v, loff_t *pos)
        ++*pos;
        e = e->next;
 
-       if (e == &nf_conntrack_expect_list)
+       if (e == &nf_ct_expect_list)
                return NULL;
 
        return e;
This page took 0.032186 seconds and 5 git commands to generate.