summaryrefslogtreecommitdiffstats
path: root/fs/ext2
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2018-08-17 09:38:39 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2018-08-17 09:38:39 -0700
commit46e62a072a8254e9e3765fdc999aba325b7918df (patch)
treee60e7dd3a12d07ea49d53341838f8c46e484ef5b /fs/ext2
parent5c60a7389d795e001c8748b458eb76e3a5b6008c (diff)
parentfe2c32545bfc281122cb8b66572949a366ad747e (diff)
downloadlinux-46e62a072a8254e9e3765fdc999aba325b7918df.tar.gz
linux-46e62a072a8254e9e3765fdc999aba325b7918df.tar.bz2
linux-46e62a072a8254e9e3765fdc999aba325b7918df.zip
Merge tag 'for_v4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs
Pull UDF and ext2 update from Jan Kara. * tag 'for_v4.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/jack/linux-fs: ext2: use ktime_get_real_seconds for timestamps udf: convert inode stamps to timespec64
Diffstat (limited to 'fs/ext2')
-rw-r--r--fs/ext2/inode.c2
-rw-r--r--fs/ext2/super.c7
2 files changed, 5 insertions, 4 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 */
diff --git a/fs/ext2/super.c b/fs/ext2/super.c
index 8ff53f8da3bc..73bd58fa13de 100644
--- a/fs/ext2/super.c
+++ b/fs/ext2/super.c
@@ -682,7 +682,8 @@ static int ext2_setup_super (struct super_block * sb,
"running e2fsck is recommended");
else if (le32_to_cpu(es->s_checkinterval) &&
(le32_to_cpu(es->s_lastcheck) +
- le32_to_cpu(es->s_checkinterval) <= get_seconds()))
+ le32_to_cpu(es->s_checkinterval) <=
+ ktime_get_real_seconds()))
ext2_msg(sb, KERN_WARNING,
"warning: checktime reached, "
"running e2fsck is recommended");
@@ -1248,7 +1249,7 @@ void ext2_sync_super(struct super_block *sb, struct ext2_super_block *es,
spin_lock(&EXT2_SB(sb)->s_lock);
es->s_free_blocks_count = cpu_to_le32(ext2_count_free_blocks(sb));
es->s_free_inodes_count = cpu_to_le32(ext2_count_free_inodes(sb));
- es->s_wtime = cpu_to_le32(get_seconds());
+ es->s_wtime = cpu_to_le32(ktime_get_real_seconds());
/* unlock before we do IO */
spin_unlock(&EXT2_SB(sb)->s_lock);
mark_buffer_dirty(EXT2_SB(sb)->s_sbh);
@@ -1360,7 +1361,7 @@ static int ext2_remount (struct super_block * sb, int * flags, char * data)
* the rdonly flag and then mark the partition as valid again.
*/
es->s_state = cpu_to_le16(sbi->s_mount_state);
- es->s_mtime = cpu_to_le32(get_seconds());
+ es->s_mtime = cpu_to_le32(ktime_get_real_seconds());
spin_unlock(&sbi->s_lock);
err = dquot_suspend(sb, -1);