[PATCH v2 resend] netfilter: remove an atomic bit operation

Subsystems: netfilter, networking [general], the rest

STALE5755d

2 messages, 2 authors, 2011-01-18 · open the first message on its own page

[PATCH v2 resend] netfilter: remove an atomic bit operation

From: Changli Gao <hidden>
Date: 2011-01-15 11:23:00

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

Signed-off-by: Changli Gao <redacted>
Cc: Tim Gardner <redacted>
Cc: Eric Dumazet <redacted>
---
v2: IPS_CONFIRMED_BIT is changed to IPS_CONFIRMED.
 net/netfilter/nf_conntrack_core.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/net/netfilter/nf_conntrack_core.c b/net/netfilter/nf_conntrack_core.c
index 27a5ea6..c708248 100644
--- a/net/netfilter/nf_conntrack_core.c
+++ b/net/netfilter/nf_conntrack_core.c
@@ -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

Re: [PATCH v2 resend] netfilter: remove an atomic bit operation

From: Patrick McHardy <hidden>
Date: 2011-01-18 14:08:42

On 15.01.2011 12:23, Changli Gao wrote:
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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help