summaryrefslogtreecommitdiff
path: root/fs/afs/callback.c
diff options
context:
space:
mode:
authorTina Ruchandani <ruchandani.tina@gmail.com>2017-03-16 16:27:46 +0000
committerDavid Howells <dhowells@redhat.com>2017-03-16 16:27:46 +0000
commit8a79790bf0b7da216627ffb85f52cfb4adbf1e4e (patch)
treec178c955a9522e7e4e3a1720ccd74551a0e71221 /fs/afs/callback.c
parentdf8a09d1b8f9e693ec3f6b7e0162fc817f2cf0db (diff)
afs: Migrate vlocation fields to 64-bit
get_seconds() returns real wall-clock seconds. On 32-bit systems this value will overflow in year 2038 and beyond. This patch changes afs's vlocation record to use ktime_get_real_seconds() instead, for the fields time_of_death and update_at. Signed-off-by: Tina Ruchandani <ruchandani.tina@gmail.com> Signed-off-by: David Howells <dhowells@redhat.com>
Diffstat (limited to 'fs/afs/callback.c')
-rw-r--r--fs/afs/callback.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/fs/afs/callback.c b/fs/afs/callback.c
index b29447e03ede..25d404d22cae 100644
--- a/fs/afs/callback.c
+++ b/fs/afs/callback.c
@@ -362,7 +362,7 @@ static void afs_callback_updater(struct work_struct *work)
{
struct afs_server *server;
struct afs_vnode *vnode, *xvnode;
- time_t now;
+ time64_t now;
long timeout;
int ret;
@@ -370,7 +370,7 @@ static void afs_callback_updater(struct work_struct *work)
_enter("");
- now = get_seconds();
+ now = ktime_get_real_seconds();
/* find the first vnode to update */
spin_lock(&server->cb_lock);
@@ -424,7 +424,8 @@ static void afs_callback_updater(struct work_struct *work)
/* and then reschedule */
_debug("reschedule");
- vnode->update_at = get_seconds() + afs_vnode_update_timeout;
+ vnode->update_at = ktime_get_real_seconds() +
+ afs_vnode_update_timeout;
spin_lock(&server->cb_lock);