]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - net/ipv4/inet_fragment.c
hlist: drop the node parameter from iterators
[mirror_ubuntu-bionic-kernel.git] / net / ipv4 / inet_fragment.c
index 2e453bde69922dfd204d99d0fe2f1cf561149269..245ae078a07fa3d991d6bba6147aab7970f36c9a 100644 (file)
@@ -33,9 +33,9 @@ static void inet_frag_secret_rebuild(unsigned long dummy)
        get_random_bytes(&f->rnd, sizeof(u32));
        for (i = 0; i < INETFRAGS_HASHSZ; i++) {
                struct inet_frag_queue *q;
-               struct hlist_node *p, *n;
+               struct hlist_node *n;
 
-               hlist_for_each_entry_safe(q, p, n, &f->hash[i], list) {
+               hlist_for_each_entry_safe(q, n, &f->hash[i], list) {
                        unsigned int hval = f->hashfn(q);
 
                        if (hval != i) {
@@ -203,7 +203,6 @@ static struct inet_frag_queue *inet_frag_intern(struct netns_frags *nf,
 {
        struct inet_frag_queue *qp;
 #ifdef CONFIG_SMP
-       struct hlist_node *n;
 #endif
        unsigned int hash;
 
@@ -219,7 +218,7 @@ static struct inet_frag_queue *inet_frag_intern(struct netns_frags *nf,
         * such entry could be created on other cpu, while we
         * promoted read lock to write lock.
         */
-       hlist_for_each_entry(qp, n, &f->hash[hash], list) {
+       hlist_for_each_entry(qp, &f->hash[hash], list) {
                if (qp->net == nf && f->match(qp, arg)) {
                        atomic_inc(&qp->refcnt);
                        write_unlock(&f->lock);
@@ -278,9 +277,8 @@ struct inet_frag_queue *inet_frag_find(struct netns_frags *nf,
        __releases(&f->lock)
 {
        struct inet_frag_queue *q;
-       struct hlist_node *n;
 
-       hlist_for_each_entry(q, n, &f->hash[hash], list) {
+       hlist_for_each_entry(q, &f->hash[hash], list) {
                if (q->net == nf && f->match(q, key)) {
                        atomic_inc(&q->refcnt);
                        read_unlock(&f->lock);