All of lore.kernel.org
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash.net>
To: Changli Gao <xiaosuo@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	netfilter-devel@vger.kernel.org, netdev@vger.kernel.org
Subject: Re: [PATCH] netfilter: don't use atomic bit operation
Date: Mon, 15 Nov 2010 11:59:42 +0100	[thread overview]
Message-ID: <4CE1129E.5040505@trash.net> (raw)
In-Reply-To: <1289725534-8439-1-git-send-email-xiaosuo@gmail.com>

On 14.11.2010 10:05, Changli Gao wrote:
> As we own ct, and the others can't see it until we confirm it, we don't
> need to use atomic bit operation on ct->status.
> 
> Signed-off-by: Changli Gao <xiaosuo@gmail.com>
> ---
>  include/net/netfilter/nf_nat_core.h |    4 ++--
>  net/ipv4/netfilter/nf_nat_core.c    |    4 ++--
>  2 files changed, 4 insertions(+), 4 deletions(-)
> diff --git a/include/net/netfilter/nf_nat_core.h b/include/net/netfilter/nf_nat_core.h
> index 33602ab..52ac1d8 100644
> --- a/include/net/netfilter/nf_nat_core.h
> +++ b/include/net/netfilter/nf_nat_core.h
> @@ -21,9 +21,9 @@ static inline int nf_nat_initialized(struct nf_conn *ct,
>  				     enum nf_nat_manip_type manip)
>  {
>  	if (manip == IP_NAT_MANIP_SRC)
> -		return test_bit(IPS_SRC_NAT_DONE_BIT, &ct->status);
> +		return IPS_SRC_NAT_DONE_BIT & ct->status;
>  	else
> -		return test_bit(IPS_DST_NAT_DONE_BIT, &ct->status);
> +		return IPS_DST_NAT_DONE_BIT & ct->status;
>  }

Looks fine, but I changed the order to ct->status & ...

Applied.

  reply	other threads:[~2010-11-15 10:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-14  9:05 [PATCH] netfilter: don't use atomic bit operation Changli Gao
2010-11-15 10:59 ` Patrick McHardy [this message]
2010-11-20 23:40   ` 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=4CE1129E.5040505@trash.net \
    --to=kaber@trash.net \
    --cc=davem@davemloft.net \
    --cc=netdev@vger.kernel.org \
    --cc=netfilter-devel@vger.kernel.org \
    --cc=xiaosuo@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.