summaryrefslogtreecommitdiff
path: root/drivers/staging/lustre/lustre/ptlrpc/sec_gc.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2015-09-27 16:45:29 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2015-09-29 04:06:16 +0200
commit8cc980713ec9e6847896891c54562ad815c33424 (patch)
treec34c4c3a9b8f4a8a3f9ee75513101f5b21a31c53 /drivers/staging/lustre/lustre/ptlrpc/sec_gc.c
parent986ef135c2afce959971b0086fc04e0f9f654120 (diff)
staging/lustre: use 64-bit times for ptlrpc_sec
Here we use an unsigned long to store the timeout for gc, which is probably safe until 2106, but this patch converts it to use ktime_get_real_seconds() and time64_t for consistency. 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/lustre/ptlrpc/sec_gc.c')
-rw-r--r--drivers/staging/lustre/lustre/ptlrpc/sec_gc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/lustre/lustre/ptlrpc/sec_gc.c b/drivers/staging/lustre/lustre/ptlrpc/sec_gc.c
index cdad608bdb8d..c3ad1dabced8 100644
--- a/drivers/staging/lustre/lustre/ptlrpc/sec_gc.c
+++ b/drivers/staging/lustre/lustre/ptlrpc/sec_gc.c
@@ -69,7 +69,7 @@ void sptlrpc_gc_add_sec(struct ptlrpc_sec *sec)
LASSERT(sec->ps_gc_interval > 0);
LASSERT(list_empty(&sec->ps_gc_list));
- sec->ps_gc_next = get_seconds() + sec->ps_gc_interval;
+ sec->ps_gc_next = ktime_get_real_seconds() + sec->ps_gc_interval;
spin_lock(&sec_gc_list_lock);
list_add_tail(&sec_gc_list, &sec->ps_gc_list);
@@ -154,11 +154,11 @@ static void sec_do_gc(struct ptlrpc_sec *sec)
CDEBUG(D_SEC, "check on sec %p(%s)\n", sec, sec->ps_policy->sp_name);
- if (cfs_time_after(sec->ps_gc_next, get_seconds()))
+ if (sec->ps_gc_next > ktime_get_real_seconds())
return;
sec->ps_policy->sp_cops->gc_ctx(sec);
- sec->ps_gc_next = get_seconds() + sec->ps_gc_interval;
+ sec->ps_gc_next = ktime_get_real_seconds() + sec->ps_gc_interval;
}
static int sec_gc_main(void *arg)