]> git.ipfire.org Git - thirdparty/e2fsprogs.git/blobdiff - e2fsck/super.c
e2fsck: don't check for future superblock times if checkinterval == 0
[thirdparty/e2fsprogs.git] / e2fsck / super.c
index e5932be6067167343faafe4c8943b9e9f28e2b9f..18affcf7234e3de83a7daf7e36dc5af9f110b947 100644 (file)
@@ -1038,7 +1038,7 @@ void check_super_block(e2fsck_t ctx)
         * Check to see if the superblock last mount time or last
         * write time is in the future.
         */
-       if (!broken_system_clock &&
+       if (!broken_system_clock && fs->super->s_checkinterval &&
            !(ctx->flags & E2F_FLAG_TIME_INSANE) &&
            fs->super->s_mtime > (__u32) ctx->now) {
                pctx.num = fs->super->s_mtime;
@@ -1050,7 +1050,7 @@ void check_super_block(e2fsck_t ctx)
                        fs->flags |= EXT2_FLAG_DIRTY;
                }
        }
-       if (!broken_system_clock &&
+       if (!broken_system_clock && fs->super->s_checkinterval &&
            !(ctx->flags & E2F_FLAG_TIME_INSANE) &&
            fs->super->s_wtime > (__u32) ctx->now) {
                pctx.num = fs->super->s_wtime;