Blame SOURCES/e2fsprogs-1.45.5-e2fsck-don-t-check-for-future-superblock-times-if-ch.patch

393826
From a9daa3b6b888c2834de9869ba8037c22ae8c47e5 Mon Sep 17 00:00:00 2001
393826
From: Theodore Ts'o <tytso@mit.edu>
393826
Date: Wed, 1 Jan 2020 21:50:27 -0500
393826
Subject: [PATCH 10/10] e2fsck: don't check for future superblock times if
393826
 checkinterval == 0
393826
393826
We are no longer enabling periodic file system checks by default in
393826
mke2fs.  The only reason why we force file system checks if the last
393826
mount time or last write time in the superblock is if this might
393826
bypass the periodic file systme checks.  So if the checkinterval is
393826
zero, skip the last mount/write time checks since there's no reason to
393826
force a check just because the system clock is incorrect.
393826
393826
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
393826
---
393826
 e2fsck/super.c | 4 ++--
393826
 1 file changed, 2 insertions(+), 2 deletions(-)
393826
393826
diff --git a/e2fsck/super.c b/e2fsck/super.c
393826
index e5932be6..18affcf7 100644
393826
--- a/e2fsck/super.c
393826
+++ b/e2fsck/super.c
393826
@@ -1038,7 +1038,7 @@ void check_super_block(e2fsck_t ctx)
393826
 	 * Check to see if the superblock last mount time or last
393826
 	 * write time is in the future.
393826
 	 */
393826
-	if (!broken_system_clock &&
393826
+	if (!broken_system_clock && fs->super->s_checkinterval &&
393826
 	    !(ctx->flags & E2F_FLAG_TIME_INSANE) &&
393826
 	    fs->super->s_mtime > (__u32) ctx->now) {
393826
 		pctx.num = fs->super->s_mtime;
393826
@@ -1050,7 +1050,7 @@ void check_super_block(e2fsck_t ctx)
393826
 			fs->flags |= EXT2_FLAG_DIRTY;
393826
 		}
393826
 	}
393826
-	if (!broken_system_clock &&
393826
+	if (!broken_system_clock && fs->super->s_checkinterval &&
393826
 	    !(ctx->flags & E2F_FLAG_TIME_INSANE) &&
393826
 	    fs->super->s_wtime > (__u32) ctx->now) {
393826
 		pctx.num = fs->super->s_wtime;
393826
-- 
393826
2.21.1
393826