diff options
author | Ksenija Stanojevic <ksenija.stanojevic@gmail.com> | 2015-09-17 12:12:53 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-09-21 00:53:56 -0400 |
commit | 22a3f9a2043be28cde6d272e786874ba0d6afe15 (patch) | |
tree | accd07556d304f3fd0113957c4da2006b1acde92 /net/rxrpc/ar-connection.c | |
parent | 62e3b1d01c4ebbf11702a27e0c749d27195ba043 (diff) |
rxrpc: Replace get_seconds with ktime_get_seconds
Replace time_t type and get_seconds function which are not y2038 safe
on 32-bit systems. Function ktime_get_seconds use monotonic instead of
real time and therefore will not cause overflow.
Signed-off-by: Ksenija Stanojevic <ksenija.stanojevic@gmail.com>
Reviewed-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/rxrpc/ar-connection.c')
-rw-r--r-- | net/rxrpc/ar-connection.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/net/rxrpc/ar-connection.c b/net/rxrpc/ar-connection.c index 6631f4f1e39b..692b3e67fb54 100644 --- a/net/rxrpc/ar-connection.c +++ b/net/rxrpc/ar-connection.c | |||
@@ -808,7 +808,7 @@ void rxrpc_put_connection(struct rxrpc_connection *conn) | |||
808 | 808 | ||
809 | ASSERTCMP(atomic_read(&conn->usage), >, 0); | 809 | ASSERTCMP(atomic_read(&conn->usage), >, 0); |
810 | 810 | ||
811 | conn->put_time = get_seconds(); | 811 | conn->put_time = ktime_get_seconds(); |
812 | if (atomic_dec_and_test(&conn->usage)) { | 812 | if (atomic_dec_and_test(&conn->usage)) { |
813 | _debug("zombie"); | 813 | _debug("zombie"); |
814 | rxrpc_queue_delayed_work(&rxrpc_connection_reap, 0); | 814 | rxrpc_queue_delayed_work(&rxrpc_connection_reap, 0); |
@@ -852,7 +852,7 @@ static void rxrpc_connection_reaper(struct work_struct *work) | |||
852 | 852 | ||
853 | _enter(""); | 853 | _enter(""); |
854 | 854 | ||
855 | now = get_seconds(); | 855 | now = ktime_get_seconds(); |
856 | earliest = ULONG_MAX; | 856 | earliest = ULONG_MAX; |
857 | 857 | ||
858 | write_lock_bh(&rxrpc_connection_lock); | 858 | write_lock_bh(&rxrpc_connection_lock); |