~csurbhi/ubuntu/maverick/e2fsprogs/e2fsprogs.fix-505719

« back to all changes in this revision

Viewing changes to e2fsck/pass1b.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2008-08-08 20:32:11 UTC
  • mfrom: (1.1.11 upstream)
  • Revision ID: james.westby@ubuntu.com-20080808203211-w72lpsd9q7o3bw6x
Tags: 1.41.0-3ubuntu1
* Merge from Debian unstable (LP: #254152, #246461), remaining changes:
  - Do not build-depend on dietlibc-dev, which is in universe.

Show diffs side-by-side

added added

removed removed

Lines of Context:
294
294
                if (ext2fs_inode_has_valid_blocks(&inode) ||
295
295
                    (ino == EXT2_BAD_INO))
296
296
                        pctx.errcode = ext2fs_block_iterate2(fs, ino,
297
 
                                     0, block_buf, process_pass1b_block, &pb);
 
297
                                             BLOCK_FLAG_READ_ONLY, block_buf,
 
298
                                             process_pass1b_block, &pb);
298
299
                if (inode.i_file_acl)
299
300
                        process_pass1b_block(fs, &inode.i_file_acl,
300
301
                                             BLOCK_COUNT_EXTATTR, 0, 0, &pb);
590
591
 
591
592
        e2fsck_read_inode(ctx, ino, &inode, "delete_file");
592
593
        if (ext2fs_inode_has_valid_blocks(&inode))
593
 
                pctx.errcode = ext2fs_block_iterate2(fs, ino, 0, block_buf,
594
 
                                                     delete_file_block, &pb);
 
594
                pctx.errcode = ext2fs_block_iterate2(fs, ino, BLOCK_FLAG_READ_ONLY, 
 
595
                                                     block_buf, delete_file_block, &pb);
595
596
        if (pctx.errcode)
596
597
                fix_problem(ctx, PR_1B_BLOCK_ITERATE, &pctx);
597
 
        ext2fs_unmark_inode_bitmap(ctx->inode_used_map, ino);
598
 
        ext2fs_unmark_inode_bitmap(ctx->inode_dir_map, ino);
599
598
        if (ctx->inode_bad_map)
600
599
                ext2fs_unmark_inode_bitmap(ctx->inode_bad_map, ino);
601
600
        ext2fs_inode_alloc_stats2(fs, ino, -1, LINUX_S_ISDIR(inode.i_mode));
602
601
 
603
602
        /* Inode may have changed by block_iterate, so reread it */
604
603
        e2fsck_read_inode(ctx, ino, &inode, "delete_file");
605
 
        inode.i_links_count = 0;
606
 
        inode.i_dtime = ctx->now;
 
604
        e2fsck_clear_inode(ctx, ino, &inode, 0, "delete_file");
607
605
        if (inode.i_file_acl &&
608
606
            (fs->super->s_feature_compat & EXT2_FEATURE_COMPAT_EXT_ATTR)) {
609
607
                count = 1;
629
627
                        delete_file_block(fs, &inode.i_file_acl,
630
628
                                          BLOCK_COUNT_EXTATTR, 0, 0, &pb);
631
629
        }
632
 
        e2fsck_write_inode(ctx, ino, &inode, "delete_file");
633
630
}
634
631
 
635
632
struct clone_struct {