summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lnet
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2015-09-27 20:45:22 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-29 02:03:37 (GMT)
commitec0067d1beeee2ca45e865d608101148b5e739d4 (patch)
tree35c9a975b03c14a49a036f495ffdda08051b4fad /drivers/staging/lustre/lnet
parent74ad578f19959fc7af219752760c1dc0b2f78ced (diff)
downloadlinux-ec0067d1beeee2ca45e865d608101148b5e739d4.tar.xz
staging/lustre: use 64-bit time for ni_last_alive
The ni_last_alive member of lnet_ni uses a 'long' to store a timestamp, which breaks on 32-bit systems in 2038. This changes it to use time64_t and the respective functions for it. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Oleg Drokin <green@linuxhacker.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/lustre/lnet')
-rw-r--r--drivers/staging/lustre/lnet/lnet/config.c2
-rw-r--r--drivers/staging/lustre/lnet/lnet/lib-move.c4
-rw-r--r--drivers/staging/lustre/lnet/lnet/router.c4
-rw-r--r--drivers/staging/lustre/lnet/lnet/router_proc.c2
4 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/lustre/lnet/lnet/config.c b/drivers/staging/lustre/lnet/lnet/config.c
index 9c576ce..b09a438 100644
--- a/drivers/staging/lustre/lnet/lnet/config.c
+++ b/drivers/staging/lustre/lnet/lnet/config.c
@@ -166,7 +166,7 @@ lnet_ni_alloc(__u32 net, struct cfs_expr_list *el, struct list_head *nilist)
/* LND will fill in the address part of the NID */
ni->ni_nid = LNET_MKNID(net, 0);
- ni->ni_last_alive = get_seconds();
+ ni->ni_last_alive = ktime_get_real_seconds();
list_add_tail(&ni->ni_list, nilist);
return ni;
failed:
diff --git a/drivers/staging/lustre/lnet/lnet/lib-move.c b/drivers/staging/lustre/lnet/lnet/lib-move.c
index 433faae..6badfec 100644
--- a/drivers/staging/lustre/lnet/lnet/lib-move.c
+++ b/drivers/staging/lustre/lnet/lnet/lib-move.c
@@ -1768,11 +1768,11 @@ lnet_parse(lnet_ni_t *ni, lnet_hdr_t *hdr, lnet_nid_t from_nid,
}
if (the_lnet.ln_routing &&
- ni->ni_last_alive != get_seconds()) {
+ ni->ni_last_alive != ktime_get_real_seconds()) {
lnet_ni_lock(ni);
/* NB: so far here is the only place to set NI status to "up */
- ni->ni_last_alive = get_seconds();
+ ni->ni_last_alive = ktime_get_real_seconds();
if (ni->ni_status != NULL &&
ni->ni_status->ns_status == LNET_NI_STATUS_DOWN)
ni->ni_status->ns_status = LNET_NI_STATUS_UP;
diff --git a/drivers/staging/lustre/lnet/lnet/router.c b/drivers/staging/lustre/lnet/lnet/router.c
index 2cdda3f..0357b05 100644
--- a/drivers/staging/lustre/lnet/lnet/router.c
+++ b/drivers/staging/lustre/lnet/lnet/router.c
@@ -789,7 +789,7 @@ static void
lnet_update_ni_status_locked(void)
{
lnet_ni_t *ni;
- long now;
+ time64_t now;
int timeout;
LASSERT(the_lnet.ln_routing);
@@ -797,7 +797,7 @@ lnet_update_ni_status_locked(void)
timeout = router_ping_timeout +
max(live_router_check_interval, dead_router_check_interval);
- now = get_seconds();
+ now = ktime_get_real_seconds();
list_for_each_entry(ni, &the_lnet.ln_nis, ni_list) {
if (ni->ni_lnd->lnd_type == LOLND)
continue;
diff --git a/drivers/staging/lustre/lnet/lnet/router_proc.c b/drivers/staging/lustre/lnet/lnet/router_proc.c
index a9f4cbf..396c7c4 100644
--- a/drivers/staging/lustre/lnet/lnet/router_proc.c
+++ b/drivers/staging/lustre/lnet/lnet/router_proc.c
@@ -692,7 +692,7 @@ static int proc_lnet_nis(struct ctl_table *table, int write,
if (ni != NULL) {
struct lnet_tx_queue *tq;
char *stat;
- long now = get_seconds();
+ time64_t now = ktime_get_real_seconds();
int last_alive = -1;
int i;
int j;