e2fsprogs/e2fsprogs-1.41.9-fixsuper.patch
OBS User autobuild a5ece0db90 Accepting request 20384 from Base:System
Copy from Base:System/e2fsprogs based on submit request 20384 from user hennevogel

OBS-URL: https://build.opensuse.org/request/show/20384
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/e2fsprogs?expand=0&rev=48
2009-09-16 20:16:59 +00:00

33 lines
1.3 KiB
Diff

See http://marc.info/?t=125258740600003&r=1&w=2
diff --git a/e2fsck/super.c b/e2fsck/super.c
index 2202967..76390af 100644
--- a/e2fsck/super.c
+++ b/e2fsck/super.c
@@ -821,9 +821,9 @@ void check_super_block(e2fsck_t ctx)
*/
if (fs->super->s_mtime > (__u32) ctx->now) {
pctx.num = fs->super->s_mtime;
- problem = PR_0_FUTURE_SB_LAST_MOUNT;
- if (fs->super->s_mtime <= (__u32) ctx->now + ctx->time_fudge)
- problem = PR_0_FUTURE_SB_LAST_MOUNT_FUDGED;
+ problem = PR_0_FUTURE_SB_LAST_MOUNT_FUDGED;
+ if (ctx->time_fudge && fs->super->s_mtime > (__u32) ctx->now + ctx->time_fudge)
+ problem = PR_0_FUTURE_SB_LAST_MOUNT;
if (fix_problem(ctx, problem, &pctx)) {
fs->super->s_mtime = ctx->now;
ext2fs_mark_super_dirty(fs);
@@ -831,9 +831,9 @@ void check_super_block(e2fsck_t ctx)
}
if (fs->super->s_wtime > (__u32) ctx->now) {
pctx.num = fs->super->s_wtime;
- problem = PR_0_FUTURE_SB_LAST_WRITE;
- if (fs->super->s_wtime <= (__u32) ctx->now + ctx->time_fudge)
- problem = PR_0_FUTURE_SB_LAST_MOUNT_FUDGED;
+ problem = PR_0_FUTURE_SB_LAST_WRITE_FUDGED;
+ if (ctx->time_fudge && fs->super->s_wtime > (__u32) ctx->now + ctx->time_fudge)
+ problem = PR_0_FUTURE_SB_LAST_WRITE;
if (fix_problem(ctx, problem, &pctx)) {
fs->super->s_wtime = ctx->now;
ext2fs_mark_super_dirty(fs);