From: Theodore Ts'o Date: Tue, 24 Oct 2000 21:16:09 +0000 (+0000) Subject: ChangeLog, pass1.c: X-Git-Tag: E2FSPROGS-1_20~228 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b09a4b0c906db2e520296b31855b7947e889f514;p=thirdparty%2Fe2fsprogs.git ChangeLog, pass1.c: pass1.c (e2fsck_pass1): Don't check the i_mode field for the journal inode, if it is in use. --- diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index 049aadc8e..51b9e444a 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -1,3 +1,8 @@ +2000-10-24 + + * pass1.c (e2fsck_pass1): Don't check the i_mode field for the + journal inode, if it is in use. + 2000-09-12 * extend.c: diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index d780b963e..e44704463 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -374,6 +374,7 @@ void e2fsck_pass1(e2fsck_t ctx) e2fsck_write_inode(ctx, ino, &inode, "pass1"); } + } /* * If dtime is set, offer to clear it. mke2fs @@ -394,13 +395,25 @@ void e2fsck_pass1(e2fsck_t ctx) } if ((ino != EXT2_ROOT_INO) && (ino < EXT2_FIRST_INODE(fs->super))) { + int problem = 0; + ext2fs_mark_inode_bitmap(ctx->inode_used_map, ino); - if (((ino == EXT2_BOOT_LOADER_INO) && - LINUX_S_ISDIR(inode.i_mode)) || - ((ino != EXT2_BOOT_LOADER_INO) && - (inode.i_mode != 0))) { - if (fix_problem(ctx, - PR_1_RESERVED_BAD_MODE, &pctx)) { + switch (ino) { + case EXT2_BOOT_LOADER_INO: + if (LINUX_S_ISDIR(inode.i_mode)) + problem = PR_1_RESERVED_BAD_MODE; + break; + case EXT2_JOURNAL_INO: + if (fs->super->s_journal_inum == + EXT2_JOURNAL_INO) + break; + default: + if (inode.i_mode != 0) + problem = PR_1_RESERVED_BAD_MODE; + break; + } + if (problem) { + if (fix_problem(ctx, problem, &pctx)) { inode.i_mode = 0; e2fsck_write_inode(ctx, ino, &inode, "pass1");