netfilter: br_netfilter: use skb_set_noref()
authorEric Dumazet <eric.dumazet@gmail.com>
Tue, 1 Jun 2010 09:48:31 +0000 (11:48 +0200)
committerPatrick McHardy <kaber@trash.net>
Tue, 1 Jun 2010 09:48:31 +0000 (11:48 +0200)
Avoid dirtying bridge_parent_rtable refcount, using new dst noref
infrastructure.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: Patrick McHardy <kaber@trash.net>
net/bridge/br_netfilter.c

index 44420992f72f17cc61f9e854ff511c8ec2bb270b..cbea5af24ce6b3cce4cfb77805692e620702e0c8 100644 (file)
@@ -244,8 +244,7 @@ static int br_nf_pre_routing_finish_ipv6(struct sk_buff *skb)
                kfree_skb(skb);
                return 0;
        }
-       dst_hold(&rt->u.dst);
-       skb_dst_set(skb, &rt->u.dst);
+       skb_dst_set_noref(skb, &rt->u.dst);
 
        skb->dev = nf_bridge->physindev;
        nf_bridge_update_protocol(skb);
@@ -396,8 +395,7 @@ bridged_dnat:
                        kfree_skb(skb);
                        return 0;
                }
-               dst_hold(&rt->u.dst);
-               skb_dst_set(skb, &rt->u.dst);
+               skb_dst_set_noref(skb, &rt->u.dst);
        }
 
        skb->dev = nf_bridge->physindev;