Skip to contentSkip to conversation

netfilter: remove an atomic bit operation

PATCH RESEND Applied Changli Gao 2 participants 2 messages Jan 15, 2011 – Jan 18, 2011

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH RESEND v2 1/1 netfilter: remove an atomic bit operation

As this ct won't be seen by the others, we don't need to set the IPS_CONFIRMED_BIT in atomic way.

Cc Tim Gardner <[email protected]>
Cc Eric Dumazet <[email protected]>

---
v2: IPS_CONFIRMED_BIT is changed to IPS_CONFIRMED.

 net/netfilter/nf_conntrack_core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
net/netfilter/nf_conntrack_core.c +1 -1
index 27a5ea6..c708248 100644
@@ -486,7 +486,7 @@ __nf_conntrack_confirm(struct sk_buff *skb)
 	ct->timeout.expires += jiffies;
 	add_timer(&ct->timeout);
 	atomic_inc(&ct->ct_general.use);
-	set_bit(IPS_CONFIRMED_BIT, &ct->status);
+	ct->status |= IPS_CONFIRMED;
 
 	/* Since the lookup is lockless, hash insertion must be done after
 	 * starting the timer and setting the CONFIRMED bit. The RCU barriers
#1 lore raw
Quoted 3 lines · Changli Gao

As this ct won't be seen by the others, we don't need to set the IPS_CONFIRMED_BIT in atomic way.

Applied, thanks.