Whamcloud - gitweb
Merge branch 'maint' into next
authorTheodore Ts'o <tytso@mit.edu>
Thu, 9 Jan 2014 17:25:37 +0000 (12:25 -0500)
committerTheodore Ts'o <tytso@mit.edu>
Thu, 9 Jan 2014 17:25:37 +0000 (12:25 -0500)
Conflicts:
e2fsck/pass1.c
lib/ext2fs/csum.c

1  2 
debugfs/debugfs.c
e2fsck/message.c
e2fsck/pass1.c
lib/ext2fs/blkmap64_rb.c

Simple merge
Simple merge
diff --cc e2fsck/pass1.c
@@@ -778,11 -735,10 +774,11 @@@ void e2fsck_pass1(e2fsck_t ctx
                        ext2fs_mark_inode_bitmap2(ctx->inode_used_map, ino);
                        continue;
                }
 -              if (pctx.errcode) {
 +              if (pctx.errcode &&
 +                  pctx.errcode != EXT2_ET_INODE_CSUM_INVALID) {
                        fix_problem(ctx, PR_1_ISCAN_ERROR, &pctx);
                        ctx->flags |= E2F_FLAG_ABORT;
-                       return;
+                       goto endit;
                }
                if (!ino)
                        break;
                } else
                        check_blocks(ctx, &pctx, block_buf);
  
 +              /*
 +               * If the inode failed the checksum and the user didn't
 +               * clear the inode, test the checksum again -- if it still
 +               * fails, ask the user if the checksum should be corrected.
 +               */
 +              if (failed_csum) {
 +                      pctx.errcode = recheck_bad_inode_checksum(fs, ino, ctx,
 +                                                                &pctx);
 +                      if (pctx.errcode) {
 +                              ctx->flags |= E2F_FLAG_ABORT;
 +                              return;
 +                      }
 +              }
 +
                if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
-                       return;
+                       goto endit;
  
                if (process_inode_count >= ctx->process_inode_size) {
                        process_inodes(ctx, block_buf);
  endit:
        e2fsck_use_inode_shortcuts(ctx, 0);
  
-       ext2fs_free_mem(&block_buf);
-       ext2fs_free_mem(&inode);
+       if (scan)
+               ext2fs_close_inode_scan(scan);
+       if (block_buf)
+               ext2fs_free_mem(&block_buf);
+       if (inode)
+               ext2fs_free_mem(&inode);
  
-       print_resource_track(ctx, _("Pass 1"), &rtrack, ctx->fs->io);
 +      /*
 +       * The l+f inode may have been cleared, so zap it now and
 +       * later passes will recalculate it if necessary
 +       */
 +      ctx->lost_and_found = 0;
 +
+       if ((ctx->flags & E2F_FLAG_SIGNAL_MASK) == 0)
+               print_resource_track(ctx, _("Pass 1"), &rtrack, ctx->fs->io);
  }
  
  /*
Simple merge