Whamcloud - gitweb
pass1.c (e2fsck_pass1): If e2fsck is run with -n, don't create
authorTheodore Ts'o <tytso@mit.edu>
Tue, 23 Jul 2002 16:00:00 +0000 (12:00 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 23 Jul 2002 16:00:00 +0000 (12:00 -0400)
the dirs_to_hash list, since we don't want to reindex
directories if the filesystem is opened read-only.

e2fsck/ChangeLog
e2fsck/pass1.c

index 132fcdf..46d8907 100644 (file)
@@ -1,3 +1,9 @@
+2002-07-23  Theodore Ts'o  <tytso@mit.edu>
+
+       * 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  <tytso@mit.edu>
 
        * e2fsck.8.in: Document new exit code FSCK_CANCELED
index bc4ac26..ce63792 100644 (file)
@@ -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;
        }