Merge branch 'master' of git://1984.lsi.us.es/nf
[~shefty/rdma-dev.git] / net / netfilter / nf_conntrack_helper.c
index bb4188f..94b4b98 100644 (file)
@@ -116,14 +116,13 @@ __nf_ct_helper_find(const struct nf_conntrack_tuple *tuple)
 {
        struct nf_conntrack_helper *helper;
        struct nf_conntrack_tuple_mask mask = { .src.u.all = htons(0xFFFF) };
-       struct hlist_node *n;
        unsigned int h;
 
        if (!nf_ct_helper_count)
                return NULL;
 
        h = helper_hash(tuple);
-       hlist_for_each_entry_rcu(helper, n, &nf_ct_helper_hash[h], hnode) {
+       hlist_for_each_entry_rcu(helper, &nf_ct_helper_hash[h], hnode) {
                if (nf_ct_tuple_src_mask_cmp(tuple, &helper->tuple, &mask))
                        return helper;
        }
@@ -134,11 +133,10 @@ struct nf_conntrack_helper *
 __nf_conntrack_helper_find(const char *name, u16 l3num, u8 protonum)
 {
        struct nf_conntrack_helper *h;
-       struct hlist_node *n;
        unsigned int i;
 
        for (i = 0; i < nf_ct_helper_hsize; i++) {
-               hlist_for_each_entry_rcu(h, n, &nf_ct_helper_hash[i], hnode) {
+               hlist_for_each_entry_rcu(h, &nf_ct_helper_hash[i], hnode) {
                        if (!strcmp(h->name, name) &&
                            h->tuple.src.l3num == l3num &&
                            h->tuple.dst.protonum == protonum)
@@ -366,7 +364,6 @@ int nf_conntrack_helper_register(struct nf_conntrack_helper *me)
 {
        int ret = 0;
        struct nf_conntrack_helper *cur;
-       struct hlist_node *n;
        unsigned int h = helper_hash(&me->tuple);
 
        BUG_ON(me->expect_policy == NULL);
@@ -374,7 +371,7 @@ int nf_conntrack_helper_register(struct nf_conntrack_helper *me)
        BUG_ON(strlen(me->name) > NF_CT_HELPER_NAME_LEN - 1);
 
        mutex_lock(&nf_ct_helper_mutex);
-       hlist_for_each_entry(cur, n, &nf_ct_helper_hash[h], hnode) {
+       hlist_for_each_entry(cur, &nf_ct_helper_hash[h], hnode) {
                if (strncmp(cur->name, me->name, NF_CT_HELPER_NAME_LEN) == 0 &&
                    cur->tuple.src.l3num == me->tuple.src.l3num &&
                    cur->tuple.dst.protonum == me->tuple.dst.protonum) {
@@ -395,13 +392,13 @@ static void __nf_conntrack_helper_unregister(struct nf_conntrack_helper *me,
 {
        struct nf_conntrack_tuple_hash *h;
        struct nf_conntrack_expect *exp;
-       const struct hlist_node *n, *next;
+       const struct hlist_node *next;
        const struct hlist_nulls_node *nn;
        unsigned int i;
 
        /* Get rid of expectations */
        for (i = 0; i < nf_ct_expect_hsize; i++) {
-               hlist_for_each_entry_safe(exp, n, next,
+               hlist_for_each_entry_safe(exp, next,
                                          &net->ct.expect_hash[i], hnode) {
                        struct nf_conn_help *help = nfct_help(exp->master);
                        if ((rcu_dereference_protected(