inet: fix inet_bind_bucket_for_each
authorLucian Adrian Grijincu <lgrijincu@ixiacom.com>
Thu, 12 Nov 2009 05:07:26 +0000 (05:07 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sat, 14 Nov 2009 04:46:56 +0000 (20:46 -0800)
The first "node" is supposed to be the cursor used in the for_each.

The second "node" is ment literally and should not be macro expanded:
it's the name of the hlist_node field from the inet_bind_bucket.

This currently works because when inet_bind_bucket_for_each is called
it's argument is still "node".

Signed-off-by: Lucian Adrian Grijincu <lgrijincu@ixiacom.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
include/net/inet_hashtables.h

index 5b698b3b463d7566a36fa361430e94a4bf6b7ac9..41cbddd25b7058235d58a4e1f35b9e376f111e7f 100644 (file)
@@ -92,8 +92,8 @@ static inline struct net *ib_net(struct inet_bind_bucket *ib)
        return read_pnet(&ib->ib_net);
 }
 
-#define inet_bind_bucket_for_each(tb, node, head) \
-       hlist_for_each_entry(tb, node, head, node)
+#define inet_bind_bucket_for_each(tb, pos, head) \
+       hlist_for_each_entry(tb, pos, head, node)
 
 struct inet_bind_hashbucket {
        spinlock_t              lock;