summaryrefslogtreecommitdiff
path: root/net/ipv6
diff options
context:
space:
mode:
authorPatrick McHardy <kaber@trash.net>2007-12-05 09:25:03 (GMT)
committerDavid S. Miller <davem@davemloft.net>2008-01-28 22:56:11 (GMT)
commit0ac41e81462de20f87242caac2b9084c202c33b7 (patch)
tree4978450cfe485614fc2c0ef962ebbfbc9dff5cf9 /net/ipv6
parentc01cd429fc118c5db92475c5f08b307718aa4efc (diff)
downloadlinux-fsl-qoriq-0ac41e81462de20f87242caac2b9084c202c33b7.tar.xz
[NETFILTER]: {nf_netlink,ip,ip6}_queue: use list_for_each_entry
Use list_add_tail/list_for_each_entry instead of list_add and list_for_each_prev as a preparation for switching to RCU. Signed-off-by: Patrick McHardy <kaber@trash.net> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/ipv6')
-rw-r--r--net/ipv6/netfilter/ip6_queue.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/net/ipv6/netfilter/ip6_queue.c b/net/ipv6/netfilter/ip6_queue.c
index 7ff9915..243a00b 100644
--- a/net/ipv6/netfilter/ip6_queue.c
+++ b/net/ipv6/netfilter/ip6_queue.c
@@ -71,7 +71,7 @@ ipq_issue_verdict(struct ipq_queue_entry *entry, int verdict)
static inline void
__ipq_enqueue_entry(struct ipq_queue_entry *entry)
{
- list_add(&entry->list, &queue_list);
+ list_add_tail(&entry->list, &queue_list);
queue_total++;
}
@@ -82,11 +82,9 @@ __ipq_enqueue_entry(struct ipq_queue_entry *entry)
static inline struct ipq_queue_entry *
__ipq_find_entry(ipq_cmpfn cmpfn, unsigned long data)
{
- struct list_head *p;
-
- list_for_each_prev(p, &queue_list) {
- struct ipq_queue_entry *entry = (struct ipq_queue_entry *)p;
+ struct ipq_queue_entry *entry;
+ list_for_each_entry(entry, &queue_list, list) {
if (!cmpfn || cmpfn(entry, data))
return entry;
}