diff mbox

[net-next,6/6] neigh: use standard interface to modify timer

Message ID 1431672946-300-7-git-send-email-ying.xue@windriver.com
State Rejected, archived
Delegated to: David Miller
Headers show

Commit Message

Ying Xue May 15, 2015, 6:55 a.m. UTC
Should use standard interface - neigh_add_timer() to modify neigh
timer.

Signed-off-by: Ying Xue <ying.xue@windriver.com>
---
 net/core/neighbour.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox

Patch

diff --git a/net/core/neighbour.c b/net/core/neighbour.c
index 67a0e42..d7c2d36 100644
--- a/net/core/neighbour.c
+++ b/net/core/neighbour.c
@@ -939,8 +939,7 @@  static void neigh_timer_handler(unsigned long arg)
 	if (neigh->nud_state & NUD_IN_TIMER) {
 		if (time_before(next, jiffies + HZ/2))
 			next = jiffies + HZ/2;
-		if (!mod_timer(&neigh->timer, next))
-			neigh_hold(neigh);
+		neigh_add_timer(neigh, next);
 	}
 	if (neigh->nud_state & (NUD_INCOMPLETE | NUD_PROBE)) {
 		neigh_probe(neigh);