diff options
Diffstat (limited to 'net')
-rw-r--r-- | net/bridge/br_fdb.c | 2 | ||||
-rw-r--r-- | net/bridge/br_stp_timer.c | 2 | ||||
-rw-r--r-- | net/core/rtnetlink.c | 2 | ||||
-rw-r--r-- | net/ipv4/igmp.c | 7 | ||||
-rw-r--r-- | net/ipv4/tcp_ipv4.c | 13 | ||||
-rw-r--r-- | net/ipv6/tcp_ipv6.c | 9 |
6 files changed, 16 insertions, 19 deletions
diff --git a/net/bridge/br_fdb.c b/net/bridge/br_fdb.c index d21f32383517..9ce430b4657c 100644 --- a/net/bridge/br_fdb.c +++ b/net/bridge/br_fdb.c | |||
@@ -312,7 +312,7 @@ int br_fdb_fillbuf(struct net_bridge *br, void *buf, | |||
312 | 312 | ||
313 | fe->is_local = f->is_local; | 313 | fe->is_local = f->is_local; |
314 | if (!f->is_static) | 314 | if (!f->is_static) |
315 | fe->ageing_timer_value = jiffies_to_clock_t(jiffies - f->updated); | 315 | fe->ageing_timer_value = jiffies_delta_to_clock_t(jiffies - f->updated); |
316 | ++fe; | 316 | ++fe; |
317 | ++num; | 317 | ++num; |
318 | } | 318 | } |
diff --git a/net/bridge/br_stp_timer.c b/net/bridge/br_stp_timer.c index a6747e673426..c3530a81a33b 100644 --- a/net/bridge/br_stp_timer.c +++ b/net/bridge/br_stp_timer.c | |||
@@ -170,5 +170,5 @@ void br_stp_port_timer_init(struct net_bridge_port *p) | |||
170 | unsigned long br_timer_value(const struct timer_list *timer) | 170 | unsigned long br_timer_value(const struct timer_list *timer) |
171 | { | 171 | { |
172 | return timer_pending(timer) | 172 | return timer_pending(timer) |
173 | ? jiffies_to_clock_t(timer->expires - jiffies) : 0; | 173 | ? jiffies_delta_to_clock_t(timer->expires - jiffies) : 0; |
174 | } | 174 | } |
diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index 2c5a0a06c4ce..db037c9a4c48 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -618,7 +618,7 @@ int rtnl_put_cacheinfo(struct sk_buff *skb, struct dst_entry *dst, u32 id, | |||
618 | long expires, u32 error) | 618 | long expires, u32 error) |
619 | { | 619 | { |
620 | struct rta_cacheinfo ci = { | 620 | struct rta_cacheinfo ci = { |
621 | .rta_lastuse = jiffies_to_clock_t(jiffies - dst->lastuse), | 621 | .rta_lastuse = jiffies_delta_to_clock_t(jiffies - dst->lastuse), |
622 | .rta_used = dst->__use, | 622 | .rta_used = dst->__use, |
623 | .rta_clntref = atomic_read(&(dst->__refcnt)), | 623 | .rta_clntref = atomic_read(&(dst->__refcnt)), |
624 | .rta_error = error, | 624 | .rta_error = error, |
diff --git a/net/ipv4/igmp.c b/net/ipv4/igmp.c index 6699f23e6f55..0b5580c69f2d 100644 --- a/net/ipv4/igmp.c +++ b/net/ipv4/igmp.c | |||
@@ -2435,6 +2435,8 @@ static int igmp_mc_seq_show(struct seq_file *seq, void *v) | |||
2435 | struct ip_mc_list *im = (struct ip_mc_list *)v; | 2435 | struct ip_mc_list *im = (struct ip_mc_list *)v; |
2436 | struct igmp_mc_iter_state *state = igmp_mc_seq_private(seq); | 2436 | struct igmp_mc_iter_state *state = igmp_mc_seq_private(seq); |
2437 | char *querier; | 2437 | char *querier; |
2438 | long delta; | ||
2439 | |||
2438 | #ifdef CONFIG_IP_MULTICAST | 2440 | #ifdef CONFIG_IP_MULTICAST |
2439 | querier = IGMP_V1_SEEN(state->in_dev) ? "V1" : | 2441 | querier = IGMP_V1_SEEN(state->in_dev) ? "V1" : |
2440 | IGMP_V2_SEEN(state->in_dev) ? "V2" : | 2442 | IGMP_V2_SEEN(state->in_dev) ? "V2" : |
@@ -2448,11 +2450,12 @@ static int igmp_mc_seq_show(struct seq_file *seq, void *v) | |||
2448 | state->dev->ifindex, state->dev->name, state->in_dev->mc_count, querier); | 2450 | state->dev->ifindex, state->dev->name, state->in_dev->mc_count, querier); |
2449 | } | 2451 | } |
2450 | 2452 | ||
2453 | delta = im->timer.expires - jiffies; | ||
2451 | seq_printf(seq, | 2454 | seq_printf(seq, |
2452 | "\t\t\t\t%08X %5d %d:%08lX\t\t%d\n", | 2455 | "\t\t\t\t%08X %5d %d:%08lX\t\t%d\n", |
2453 | im->multiaddr, im->users, | 2456 | im->multiaddr, im->users, |
2454 | im->tm_running, im->tm_running ? | 2457 | im->tm_running, |
2455 | jiffies_to_clock_t(im->timer.expires-jiffies) : 0, | 2458 | im->tm_running ? jiffies_delta_to_clock_t(delta) : 0, |
2456 | im->reporter); | 2459 | im->reporter); |
2457 | } | 2460 | } |
2458 | return 0; | 2461 | return 0; |
diff --git a/net/ipv4/tcp_ipv4.c b/net/ipv4/tcp_ipv4.c index 42b2a6a73092..c660d2c19a2b 100644 --- a/net/ipv4/tcp_ipv4.c +++ b/net/ipv4/tcp_ipv4.c | |||
@@ -2385,7 +2385,7 @@ static void get_openreq4(const struct sock *sk, const struct request_sock *req, | |||
2385 | struct seq_file *f, int i, int uid, int *len) | 2385 | struct seq_file *f, int i, int uid, int *len) |
2386 | { | 2386 | { |
2387 | const struct inet_request_sock *ireq = inet_rsk(req); | 2387 | const struct inet_request_sock *ireq = inet_rsk(req); |
2388 | int ttd = req->expires - jiffies; | 2388 | long delta = req->expires - jiffies; |
2389 | 2389 | ||
2390 | seq_printf(f, "%4d: %08X:%04X %08X:%04X" | 2390 | seq_printf(f, "%4d: %08X:%04X %08X:%04X" |
2391 | " %02X %08X:%08X %02X:%08lX %08X %5d %8d %u %d %pK%n", | 2391 | " %02X %08X:%08X %02X:%08lX %08X %5d %8d %u %d %pK%n", |
@@ -2397,7 +2397,7 @@ static void get_openreq4(const struct sock *sk, const struct request_sock *req, | |||
2397 | TCP_SYN_RECV, | 2397 | TCP_SYN_RECV, |
2398 | 0, 0, /* could print option size, but that is af dependent. */ | 2398 | 0, 0, /* could print option size, but that is af dependent. */ |
2399 | 1, /* timers active (only the expire timer) */ | 2399 | 1, /* timers active (only the expire timer) */ |
2400 | jiffies_to_clock_t(ttd), | 2400 | jiffies_delta_to_clock_t(delta), |
2401 | req->retrans, | 2401 | req->retrans, |
2402 | uid, | 2402 | uid, |
2403 | 0, /* non standard timer */ | 2403 | 0, /* non standard timer */ |
@@ -2448,7 +2448,7 @@ static void get_tcp4_sock(struct sock *sk, struct seq_file *f, int i, int *len) | |||
2448 | tp->write_seq - tp->snd_una, | 2448 | tp->write_seq - tp->snd_una, |
2449 | rx_queue, | 2449 | rx_queue, |
2450 | timer_active, | 2450 | timer_active, |
2451 | jiffies_to_clock_t(timer_expires - jiffies), | 2451 | jiffies_delta_to_clock_t(timer_expires - jiffies), |
2452 | icsk->icsk_retransmits, | 2452 | icsk->icsk_retransmits, |
2453 | sock_i_uid(sk), | 2453 | sock_i_uid(sk), |
2454 | icsk->icsk_probes_out, | 2454 | icsk->icsk_probes_out, |
@@ -2467,10 +2467,7 @@ static void get_timewait4_sock(const struct inet_timewait_sock *tw, | |||
2467 | { | 2467 | { |
2468 | __be32 dest, src; | 2468 | __be32 dest, src; |
2469 | __u16 destp, srcp; | 2469 | __u16 destp, srcp; |
2470 | int ttd = tw->tw_ttd - jiffies; | 2470 | long delta = tw->tw_ttd - jiffies; |
2471 | |||
2472 | if (ttd < 0) | ||
2473 | ttd = 0; | ||
2474 | 2471 | ||
2475 | dest = tw->tw_daddr; | 2472 | dest = tw->tw_daddr; |
2476 | src = tw->tw_rcv_saddr; | 2473 | src = tw->tw_rcv_saddr; |
@@ -2480,7 +2477,7 @@ static void get_timewait4_sock(const struct inet_timewait_sock *tw, | |||
2480 | seq_printf(f, "%4d: %08X:%04X %08X:%04X" | 2477 | seq_printf(f, "%4d: %08X:%04X %08X:%04X" |
2481 | " %02X %08X:%08X %02X:%08lX %08X %5d %8d %d %d %pK%n", | 2478 | " %02X %08X:%08X %02X:%08lX %08X %5d %8d %d %d %pK%n", |
2482 | i, src, srcp, dest, destp, tw->tw_substate, 0, 0, | 2479 | i, src, srcp, dest, destp, tw->tw_substate, 0, 0, |
2483 | 3, jiffies_to_clock_t(ttd), 0, 0, 0, 0, | 2480 | 3, jiffies_delta_to_clock_t(delta), 0, 0, 0, 0, |
2484 | atomic_read(&tw->tw_refcnt), tw, len); | 2481 | atomic_read(&tw->tw_refcnt), tw, len); |
2485 | } | 2482 | } |
2486 | 2483 | ||
diff --git a/net/ipv6/tcp_ipv6.c b/net/ipv6/tcp_ipv6.c index c66b90f71c9b..aa41b0e6b163 100644 --- a/net/ipv6/tcp_ipv6.c +++ b/net/ipv6/tcp_ipv6.c | |||
@@ -1875,7 +1875,7 @@ static void get_tcp6_sock(struct seq_file *seq, struct sock *sp, int i) | |||
1875 | tp->write_seq-tp->snd_una, | 1875 | tp->write_seq-tp->snd_una, |
1876 | (sp->sk_state == TCP_LISTEN) ? sp->sk_ack_backlog : (tp->rcv_nxt - tp->copied_seq), | 1876 | (sp->sk_state == TCP_LISTEN) ? sp->sk_ack_backlog : (tp->rcv_nxt - tp->copied_seq), |
1877 | timer_active, | 1877 | timer_active, |
1878 | jiffies_to_clock_t(timer_expires - jiffies), | 1878 | jiffies_delta_to_clock_t(timer_expires - jiffies), |
1879 | icsk->icsk_retransmits, | 1879 | icsk->icsk_retransmits, |
1880 | sock_i_uid(sp), | 1880 | sock_i_uid(sp), |
1881 | icsk->icsk_probes_out, | 1881 | icsk->icsk_probes_out, |
@@ -1895,10 +1895,7 @@ static void get_timewait6_sock(struct seq_file *seq, | |||
1895 | const struct in6_addr *dest, *src; | 1895 | const struct in6_addr *dest, *src; |
1896 | __u16 destp, srcp; | 1896 | __u16 destp, srcp; |
1897 | const struct inet6_timewait_sock *tw6 = inet6_twsk((struct sock *)tw); | 1897 | const struct inet6_timewait_sock *tw6 = inet6_twsk((struct sock *)tw); |
1898 | int ttd = tw->tw_ttd - jiffies; | 1898 | long delta = tw->tw_ttd - jiffies; |
1899 | |||
1900 | if (ttd < 0) | ||
1901 | ttd = 0; | ||
1902 | 1899 | ||
1903 | dest = &tw6->tw_v6_daddr; | 1900 | dest = &tw6->tw_v6_daddr; |
1904 | src = &tw6->tw_v6_rcv_saddr; | 1901 | src = &tw6->tw_v6_rcv_saddr; |
@@ -1914,7 +1911,7 @@ static void get_timewait6_sock(struct seq_file *seq, | |||
1914 | dest->s6_addr32[0], dest->s6_addr32[1], | 1911 | dest->s6_addr32[0], dest->s6_addr32[1], |
1915 | dest->s6_addr32[2], dest->s6_addr32[3], destp, | 1912 | dest->s6_addr32[2], dest->s6_addr32[3], destp, |
1916 | tw->tw_substate, 0, 0, | 1913 | tw->tw_substate, 0, 0, |
1917 | 3, jiffies_to_clock_t(ttd), 0, 0, 0, 0, | 1914 | 3, jiffies_delta_to_clock_t(delta), 0, 0, 0, 0, |
1918 | atomic_read(&tw->tw_refcnt), tw); | 1915 | atomic_read(&tw->tw_refcnt), tw); |
1919 | } | 1916 | } |
1920 | 1917 | ||