Whamcloud - gitweb
e2fsck: fix timestamps logic for 32-bit systems
authorTheodore Ts'o <tytso@mit.edu>
Sun, 4 Sep 2016 03:33:11 +0000 (23:33 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 4 Sep 2016 03:33:11 +0000 (23:33 -0400)
Commit 35a4e1b1c5cbb introduced a regression which caused e2fsck on
32-bit systems to think all timestamps were legacy pre-1970
timestamps.  Fix the bug.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/pass1.c

index 8623063..da0ddf4 100644 (file)
@@ -512,9 +512,9 @@ static void check_inode_extra_space(e2fsck_t ctx, struct problem_context *pctx)
         * If the inode's extended atime (ctime, crtime, mtime) is stored in
         * the old, invalid format, repair it.
         */
-       if ((sizeof(time_t) <= 4) ||
-           (((sizeof(time_t) > 4) &&
-             ctx->now < EXT4_EXTRA_NEGATIVE_DATE_CUTOFF)) &&
+       if (((sizeof(time_t) <= 4) ||
+            (((sizeof(time_t) > 4) &&
+              ctx->now < EXT4_EXTRA_NEGATIVE_DATE_CUTOFF))) &&
            (CHECK_INODE_EXTRA_NEGATIVE_EPOCH(inode, atime) ||
             CHECK_INODE_EXTRA_NEGATIVE_EPOCH(inode, ctime) ||
             CHECK_INODE_EXTRA_NEGATIVE_EPOCH(inode, crtime) ||