The hpfs code uses "get_seconds()" and "time_t", this will cause problems on 32-bit architectures in 2038 when time_t overflows. This patch replaces "get_seconds()" and "time_t" with "ktime_get_real_seconds()" and "time64_t".
Signed-off-by: DengChao chao.deng@linaro.org --- fs/hpfs/namei.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/fs/hpfs/namei.c b/fs/hpfs/namei.c index 9e92c9c..9fcb6f0 100644 --- a/fs/hpfs/namei.c +++ b/fs/hpfs/namei.c @@ -10,7 +10,7 @@
static void hpfs_update_directory_times(struct inode *dir) { - time_t t = get_seconds(); + time64_t t = ktime_get_real_seconds(); if (t == dir->i_mtime.tv_sec && t == dir->i_ctime.tv_sec) return;