LVS
lvs-devel
Google
 
Web LinuxVirtualServer.org

Re: [PATCH 3/3] ipvs: fix get_curr_sync_buff

To: Simon Horman <horms@xxxxxxxxxxxx>
Subject: Re: [PATCH 3/3] ipvs: fix get_curr_sync_buff
Cc: Tinggong Wang <wangtinggong@xxxxxxxxx>, Wensong Zhang <wensong@xxxxxxxxxxxx>, "lvs-devel@xxxxxxxxxxxxxxx" <lvs-devel@xxxxxxxxxxxxxxx>, Hans Schillstrom <hans@xxxxxxxxxxxxxxx>, Julian Anastasov <ja@xxxxxx>
From: Hans Schillstrom <hans.schillstrom@xxxxxxxxxxxx>
Date: Mon, 13 Dec 2010 10:21:17 +0100
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@xxxxxxxxx>
> > ---
> >  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@xxxxxxxxxxxx>


--
To unsubscribe from this list: send the line "unsubscribe lvs-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

<Prev in Thread] Current Thread [Next in Thread>