summaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorArnd Bergmann2018-07-29 21:50:00 +0200
committerTheodore Ts'o2018-07-29 21:50:00 +0200
commit5ffff834322281f550b10c958fd9dd85679b8dbb (patch)
treee50bb5f0dbb6caf4ad7d6f0aed7f0e1cef91c12b /fs
parentext4: use 64-bit timestamps for mmp_time (diff)
downloadkernel-qcow2-linux-5ffff834322281f550b10c958fd9dd85679b8dbb.tar.gz
kernel-qcow2-linux-5ffff834322281f550b10c958fd9dd85679b8dbb.tar.xz
kernel-qcow2-linux-5ffff834322281f550b10c958fd9dd85679b8dbb.zip
ext4: use ktime_get_real_seconds for i_dtime
We only care about the low 32-bit for i_dtime as explained in commit b5f515735bea ("ext4: avoid Y2038 overflow in recently_deleted()"), so the use of get_seconds() is correct here, but that function is getting removed in the process of the y2038 fixes, so let's use the modern ktime_get_real_seconds() here. Reviewed-by: Andreas Dilger <adilger@dilger.ca> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Theodore Ts'o <tytso@mit.edu>
Diffstat (limited to 'fs')
-rw-r--r--fs/ext4/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/inode.c b/fs/ext4/inode.c
index 4efe77286ecd..ba0de19fb1ad 100644
--- a/fs/ext4/inode.c
+++ b/fs/ext4/inode.c
@@ -317,7 +317,7 @@ stop_handle:
* (Well, we could do this if we need to, but heck - it works)
*/
ext4_orphan_del(handle, inode);
- EXT4_I(inode)->i_dtime = get_seconds();
+ EXT4_I(inode)->i_dtime = (__u32)ktime_get_real_seconds();
/*
* One subtle ordering requirement: if anything has gone wrong