From: Theodore Ts'o Date: Tue, 23 Jul 2002 16:00:00 +0000 (-0400) Subject: pass1.c (e2fsck_pass1): If e2fsck is run with -n, don't create X-Git-Tag: E2FSPROGS-1.28-WIP-0817~26 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3214a453db281839f217fa753c7309d965958acc;p=thirdparty%2Fe2fsprogs.git pass1.c (e2fsck_pass1): If e2fsck is run with -n, don't create the dirs_to_hash list, since we don't want to reindex directories if the filesystem is opened read-only. --- diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index 132fcdf60..46d89075f 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -1,3 +1,9 @@ +2002-07-23 Theodore Ts'o + + * pass1.c (e2fsck_pass1): If e2fsck is run with -n, don't create + the dirs_to_hash list, since we don't want to reindex + directories if the filesystem is opened read-only. + 2002-07-21 Theodore Ts'o * e2fsck.8.in: Document new exit code FSCK_CANCELED diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index bc4ac26a5..ce63792f6 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -277,7 +277,8 @@ void e2fsck_pass1(e2fsck_t ctx) if (!(ctx->options & E2F_OPT_PREEN)) fix_problem(ctx, PR_1_PASS_HEADER, &pctx); - if (fs->super->s_feature_compat & EXT2_FEATURE_COMPAT_DIR_INDEX) { + if ((fs->super->s_feature_compat & EXT2_FEATURE_COMPAT_DIR_INDEX) && + !(ctx->options & E2F_OPT_NO)) { if (ext2fs_u32_list_create(&ctx->dirs_to_hash, 50)) ctx->dirs_to_hash = 0; }