Skip to content

Commit

Permalink
bridge: use time_before() in br_fdb_cleanup()
Browse files Browse the repository at this point in the history
In br_fdb_cleanup() next_timer and this_timer are in jiffies, so they
should be compared using the time_after() macro.

Signed-off-by: Fabio Checconi <fabio@gandalf.sssup.it>
Signed-off-by: Stephen Hemminger <stephen.hemminger@vyatta.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Fabio Checconi authored and David S. Miller committed Mar 20, 2008
1 parent 7582a33 commit 2bec008
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/bridge/br_fdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ void br_fdb_cleanup(unsigned long _data)
this_timer = f->ageing_timer + delay;
if (time_before_eq(this_timer, jiffies))
fdb_delete(f);
else if (this_timer < next_timer)
else if (time_before(this_timer, next_timer))
next_timer = this_timer;
}
}
Expand Down

0 comments on commit 2bec008

Please sign in to comment.