public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next-2.6] br_netfilter: use skb_set_noref()
@ 2010-05-31 21:23 Eric Dumazet
  2010-06-01  9:56 ` Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Eric Dumazet @ 2010-05-31 21:23 UTC (permalink / raw)
  To: Stephen Hemminger, Patrick McHardy, David Miller; +Cc: bridge, netdev

Avoid dirtying bridge_parent_rtable refcount, using new dst noref
infrastructure.

Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
---
net/bridge/br_netfilter.c |    6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/net/bridge/br_netfilter.c b/net/bridge/br_netfilter.c
index 4442099..cbea5af 100644
--- a/net/bridge/br_netfilter.c
+++ b/net/bridge/br_netfilter.c
@@ -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;




^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2010-06-01  9:56 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-31 21:23 [PATCH net-next-2.6] br_netfilter: use skb_set_noref() Eric Dumazet
2010-06-01  9:56 ` Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox