Skip to content

Commit 5ffff83

Browse files
arndbtytso
authored andcommitted
ext4: use ktime_get_real_seconds for i_dtime
We only care about the low 32-bit for i_dtime as explained in commit b5f5157 ("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>
1 parent af123b3 commit 5ffff83

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

‎fs/ext4/inode.c‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ void ext4_evict_inode(struct inode *inode)
317317
* (Well, we could do this if we need to, but heck - it works)
318318
*/
319319
ext4_orphan_del(handle, inode);
320-
EXT4_I(inode)->i_dtime = get_seconds();
320+
EXT4_I(inode)->i_dtime = (__u32)ktime_get_real_seconds();
321321

322322
/*
323323
* One subtle ordering requirement: if anything has gone wrong

0 commit comments

Comments
 (0)