All of lore.kernel.org
 help / color / mirror / Atom feed
From: Hans Schillstrom <hans.schillstrom@ericsson.com>
To: Simon Horman <horms@verge.net.au>
Cc: Tinggong Wang <wangtinggong@gmail.com>,
	Wensong Zhang <wensong@linux-vs.org>,
	"lvs-devel@vger.kernel.org" <lvs-devel@vger.kernel.org>,
	Hans Schillstrom <hans@schillstrom.com>,
	Julian Anastasov <ja@ssi.bg>
Subject: Re: [PATCH 3/3] ipvs: fix get_curr_sync_buff
Date: Mon, 13 Dec 2010 10:21:17 +0100	[thread overview]
Message-ID: <1292232077.4983.51.camel@seasc0214> (raw)
In-Reply-To: <20101212214953.GG7914@verge.net.au>

On Sun, 2010-12-12 at 22:49 +0100, Simon Horman wrote:
> [ CCed Hans Schillstrom and Julian Anastasov ]
> 
> On Sun, Dec 12, 2010 at 07:43:04PM +0800, Tinggong Wang wrote:
> > use time_after get the current buffer created more than the specified time.
> > 
> > time_before in get_curr_sync_buff(2 * HZ) will get the buffer created newly.
> > if curr_sb has been created more than 2*HZ then it will still sit in master.
> > so use time_after instead.
> > 
> > Signed-off-by: Tinggong Wang <wangtinggong@gmail.com>
> > ---
> >  net/netfilter/ipvs/ip_vs_sync.c |    3 +--
> >  1 files changed, 1 insertions(+), 2 deletions(-)
> > 
> > diff --git a/net/netfilter/ipvs/ip_vs_sync.c b/net/netfilter/ipvs/ip_vs_sync.c
> > index 2b6b0cb..555b0dd 100644
> > --- a/net/netfilter/ipvs/ip_vs_sync.c
> > +++ b/net/netfilter/ipvs/ip_vs_sync.c
> > @@ -221,8 +221,7 @@ get_curr_sync_buff(unsigned long time)
> >  	struct ip_vs_sync_buff *sb;
> >  
> >  	spin_lock_bh(&curr_sb_lock);
> > -	if (curr_sb && (time == 0 ||
> > -			time_before(jiffies - curr_sb->firstuse, time))) {
> > +	if (curr_sb && time_after(jiffies - curr_sb->firstuse, time)) {
> >  		sb = curr_sb;
> >  		curr_sb = NULL;
> >  	} else
> > -- 
> > 1.7.2.3
> 
> This change seems correct to me. Hans, can I get an Ack or otherwise from you?
> 
This is OK except for that it needs a rebase if it's applied after IPv6
and PE patches.

Acked-by: Hans Schillstrom <hans.schillstrom@ericsson.com>



  reply	other threads:[~2010-12-13  9:21 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-12 11:41 [PATCH 1/3] ipvs: use SYNC_MESG_HEADER_LEN instead of explicit header length Tinggong Wang
2010-12-12 11:42 ` [PATCH 2/3] ipvs: check data validation before local_bh_disable Tinggong Wang
2010-12-12 11:43   ` [PATCH 3/3] ipvs: fix get_curr_sync_buff Tinggong Wang
2010-12-12 21:49     ` Simon Horman
2010-12-13  9:21       ` Hans Schillstrom [this message]
2010-12-13 23:32     ` Julian Anastasov
2010-12-14  3:00       ` Tinggong Wang
2010-12-14  8:28         ` Julian Anastasov
2010-12-15  8:28           ` Simon Horman
2010-12-12 21:48   ` [PATCH 2/3] ipvs: check data validation before local_bh_disable Simon Horman
2010-12-13  3:44     ` Tinggong Wang
2010-12-13  6:29       ` Simon Horman
2010-12-13  8:53         ` Hans Schillstrom
2010-12-13 10:49           ` Tinggong Wang
2010-12-13 18:06             ` Tinggong Wang
2010-12-12 21:46 ` [PATCH 1/3] ipvs: use SYNC_MESG_HEADER_LEN instead of explicit header length Simon Horman
2010-12-13  8:16   ` Hans Schillstrom

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=1292232077.4983.51.camel@seasc0214 \
    --to=hans.schillstrom@ericsson.com \
    --cc=hans@schillstrom.com \
    --cc=horms@verge.net.au \
    --cc=ja@ssi.bg \
    --cc=lvs-devel@vger.kernel.org \
    --cc=wangtinggong@gmail.com \
    --cc=wensong@linux-vs.org \
    /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.