public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Changli Gao <xiaosuo@gmail•com>
To: Patrick McHardy <kaber@trash•net>
Cc: "David S. Miller" <davem@davemloft•net>,
	netfilter-devel@vger•kernel.org, netdev@vger•kernel.org,
	Changli Gao <xiaosuo@gmail•com>
Subject: [PATCH] netfilter: remove an atomic bit operation
Date: Sat, 20 Nov 2010 15:55:17 +0800	[thread overview]
Message-ID: <1290239717-12664-1-git-send-email-xiaosuo@gmail.com> (raw)

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 <xiaosuo@gmail•com>
---
 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_BIT;
 
 	/* Since the lookup is lockless, hash insertion must be done after
 	 * starting the timer and setting the CONFIRMED bit. The RCU barriers

             reply	other threads:[~2010-11-20  7:55 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-20  7:55 Changli Gao [this message]
2010-11-20 16:03 ` [PATCH] netfilter: remove an atomic bit operation Tim Gardner
2010-11-20 16:50   ` Eric Dumazet
2010-11-20 23:38     ` Changli Gao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1290239717-12664-1-git-send-email-xiaosuo@gmail.com \
    --to=xiaosuo@gmail$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=kaber@trash$(echo .)net \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=netfilter-devel@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox