Whamcloud - gitweb
Apply fixes reported by Andreas Gruenbacher:
authorTheodore Ts'o <tytso@mit.edu>
Wed, 25 Jul 2001 23:48:24 +0000 (19:48 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 25 Jul 2001 23:48:24 +0000 (19:48 -0400)
pass1.c (check_ext_attr): Skip zero-length EA entries.

problem.c: PR_1_EA_ALLOC_COLLISION shouldn't abort, but should prompt
to clear the EA block.

e2fsck/ChangeLog
e2fsck/pass1.c
e2fsck/problem.c

index d69d349..22b4708 100644 (file)
@@ -1,3 +1,10 @@
+2001-07-25  Theodore Tso  <tytso@valinux.com>
+
+       * pass1.c (check_ext_attr): Skip zero-length EA entries.
+
+       * problem.c: PR_1_EA_ALLOC_COLLISION shouldn't abort, but should
+               prompt to clear the EA block.
+
 2001-07-22  Theodore Tso  <tytso@valinux.com>
 
        * journal.c (ll_rw_block): Use ctx->journal_io instead of the
index ab8dcfe..6d763d2 100644 (file)
@@ -1057,8 +1057,9 @@ static int check_ext_attr(e2fsck_t ctx, struct problem_context *pctx,
                        if (fix_problem(ctx, PR_1_EA_BAD_VALUE, pctx))
                                goto clear_extattr;
                }
-               if (region_allocate(region, entry->e_value_offs,
-                                  EXT2_EXT_ATTR_SIZE(entry->e_value_size))) {
+               if (entry->e_value_size &&
+                   region_allocate(region, entry->e_value_offs,
+                                   EXT2_EXT_ATTR_SIZE(entry->e_value_size))) {
                        if (fix_problem(ctx, PR_1_EA_ALLOC_COLLISION, pctx))
                                goto clear_extattr;
                }
index 34a3784..dd215a1 100644 (file)
@@ -610,7 +610,7 @@ static const struct e2fsck_problem problem_table[] = {
        /* Error EA allocation collision */
        { PR_1_EA_ALLOC_COLLISION,
          N_("@a @b %b is corrupt (allocation collision).  "),
-         PROMPT_ABORT, 0},
+         PROMPT_CLEAR, 0},
        
        /* Bad extended attribute name */
        { PR_1_EA_BAD_NAME,