diff options
Diffstat (limited to 'net/ipv4/inet_diag.c')
-rw-r--r-- | net/ipv4/inet_diag.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/net/ipv4/inet_diag.c b/net/ipv4/inet_diag.c index def007ec1d6f..686ddd62f71a 100644 --- a/net/ipv4/inet_diag.c +++ b/net/ipv4/inet_diag.c | |||
@@ -11,6 +11,7 @@ | |||
11 | * 2 of the License, or (at your option) any later version. | 11 | * 2 of the License, or (at your option) any later version. |
12 | */ | 12 | */ |
13 | 13 | ||
14 | #include <linux/kernel.h> | ||
14 | #include <linux/module.h> | 15 | #include <linux/module.h> |
15 | #include <linux/types.h> | 16 | #include <linux/types.h> |
16 | #include <linux/fcntl.h> | 17 | #include <linux/fcntl.h> |
@@ -112,7 +113,7 @@ static int inet_csk_diag_fill(struct sock *sk, | |||
112 | } | 113 | } |
113 | #endif | 114 | #endif |
114 | 115 | ||
115 | #define EXPIRES_IN_MS(tmo) ((tmo - jiffies) * 1000 + HZ - 1) / HZ | 116 | #define EXPIRES_IN_MS(tmo) DIV_ROUND_UP((tmo - jiffies) * 1000, HZ) |
116 | 117 | ||
117 | if (icsk->icsk_pending == ICSK_TIME_RETRANS) { | 118 | if (icsk->icsk_pending == ICSK_TIME_RETRANS) { |
118 | r->idiag_timer = 1; | 119 | r->idiag_timer = 1; |
@@ -190,7 +191,7 @@ static int inet_twsk_diag_fill(struct inet_timewait_sock *tw, | |||
190 | r->id.idiag_dst[0] = tw->tw_daddr; | 191 | r->id.idiag_dst[0] = tw->tw_daddr; |
191 | r->idiag_state = tw->tw_substate; | 192 | r->idiag_state = tw->tw_substate; |
192 | r->idiag_timer = 3; | 193 | r->idiag_timer = 3; |
193 | r->idiag_expires = (tmo * 1000 + HZ - 1) / HZ; | 194 | r->idiag_expires = DIV_ROUND_UP(tmo * 1000, HZ); |
194 | r->idiag_rqueue = 0; | 195 | r->idiag_rqueue = 0; |
195 | r->idiag_wqueue = 0; | 196 | r->idiag_wqueue = 0; |
196 | r->idiag_uid = 0; | 197 | r->idiag_uid = 0; |