diff options
Diffstat (limited to 'net/ipv4/inet_timewait_sock.c')
-rw-r--r-- | net/ipv4/inet_timewait_sock.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/ipv4/inet_timewait_sock.c b/net/ipv4/inet_timewait_sock.c index 2586df09b9b6..4e189e28f306 100644 --- a/net/ipv4/inet_timewait_sock.c +++ b/net/ipv4/inet_timewait_sock.c | |||
@@ -8,7 +8,7 @@ | |||
8 | * From code orinally in TCP | 8 | * From code orinally in TCP |
9 | */ | 9 | */ |
10 | 10 | ||
11 | 11 | #include <linux/kernel.h> | |
12 | #include <net/inet_hashtables.h> | 12 | #include <net/inet_hashtables.h> |
13 | #include <net/inet_timewait_sock.h> | 13 | #include <net/inet_timewait_sock.h> |
14 | #include <net/ip.h> | 14 | #include <net/ip.h> |
@@ -292,7 +292,7 @@ void inet_twsk_schedule(struct inet_timewait_sock *tw, | |||
292 | if (timeo >= timewait_len) { | 292 | if (timeo >= timewait_len) { |
293 | slot = INET_TWDR_TWKILL_SLOTS - 1; | 293 | slot = INET_TWDR_TWKILL_SLOTS - 1; |
294 | } else { | 294 | } else { |
295 | slot = (timeo + twdr->period - 1) / twdr->period; | 295 | slot = DIV_ROUND_UP(timeo, twdr->period); |
296 | if (slot >= INET_TWDR_TWKILL_SLOTS) | 296 | if (slot >= INET_TWDR_TWKILL_SLOTS) |
297 | slot = INET_TWDR_TWKILL_SLOTS - 1; | 297 | slot = INET_TWDR_TWKILL_SLOTS - 1; |
298 | } | 298 | } |