From: Theodore Ts'o Date: Sun, 4 Sep 2016 03:33:11 +0000 (-0400) Subject: e2fsck: fix timestamps logic for 32-bit systems X-Git-Tag: v1.43.3~5 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=254195627f052f09282f2cba37222b371ab47d60;p=tools%2Fe2fsprogs.git e2fsck: fix timestamps logic for 32-bit systems 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 --- diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index 8623063..da0ddf4 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -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) ||