diff options
author | Arnd Bergmann <arnd@arndb.de> | 2018-06-20 16:31:40 +0200 |
---|---|---|
committer | Jan Kara <jack@suse.cz> | 2018-06-27 13:59:18 +0200 |
commit | fe2c32545bfc281122cb8b66572949a366ad747e (patch) | |
tree | 2b339d9911e3d103f19075c1210acb16db5b1707 /fs/ext2/inode.c | |
parent | c3b9cecd89b806e14544af596396e18abd00f145 (diff) | |
download | linux-fe2c32545bfc281122cb8b66572949a366ad747e.tar.bz2 |
ext2: use ktime_get_real_seconds for timestamps
get_seconds() is deprecated because of the y2038 overflow, so users
should migrate to 64-bit timestamps using ktime_get_real_seconds().
In ext2, the timestamps in the superblock and in the inode are all
limited to 32-bit, and this won't get fixed, so let's just stop
using the deprecated interface and keep truncating.
All users of ext2 should migrate to ext4 before 2038 to prevent this
from causing problems.
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jan Kara <jack@suse.cz>
Diffstat (limited to 'fs/ext2/inode.c')
-rw-r--r-- | fs/ext2/inode.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext2/inode.c b/fs/ext2/inode.c index 71635909df3b..7f7ee18fe179 100644 --- a/fs/ext2/inode.c +++ b/fs/ext2/inode.c @@ -86,7 +86,7 @@ void ext2_evict_inode(struct inode * inode) if (want_delete) { sb_start_intwrite(inode->i_sb); /* set dtime */ - EXT2_I(inode)->i_dtime = get_seconds(); + EXT2_I(inode)->i_dtime = ktime_get_real_seconds(); mark_inode_dirty(inode); __ext2_write_inode(inode, inode_needs_sync(inode)); /* truncate to 0 */ |