summaryrefslogtreecommitdiff
path: root/e2fsck/pass4.c
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2002-08-17 10:19:44 -0400
committerTheodore Ts'o <tytso@mit.edu>2002-08-17 10:19:44 -0400
commit0684a4f33b5c268fe12f57fcbc77a880c79ab282 (patch)
treebc9dc324c0bd760d48f9d5be378f094811989908 /e2fsck/pass4.c
parent0ccd488a764c14b27983b92435deca5e1adf9061 (diff)
downloade2fsprogs-0684a4f33b5c268fe12f57fcbc77a880c79ab282.tar.gz
Overhaul extended attribute handling. Should now be correct with
respect to the latest V2 bestbits ACL code.
Diffstat (limited to 'e2fsck/pass4.c')
-rw-r--r--e2fsck/pass4.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/e2fsck/pass4.c b/e2fsck/pass4.c
index 28c0996c..d1ffd82e 100644
--- a/e2fsck/pass4.c
+++ b/e2fsck/pass4.c
@@ -34,11 +34,14 @@ static int disconnect_inode(e2fsck_t ctx, ext2_ino_t i)
pctx.ino = i;
pctx.inode = &inode;
+ /*
+ * Offer to delete any zero-length files that does not have
+ * blocks. If there is an EA block, it might have useful
+ * information, so we won't prompt to delete it, but let it be
+ * reconnected to lost+found.
+ */
if (!inode.i_blocks && (LINUX_S_ISREG(inode.i_mode) ||
LINUX_S_ISDIR(inode.i_mode))) {
- /*
- * This is a zero-length file; prompt to delete it...
- */
if (fix_problem(ctx, PR_4_ZERO_LEN_INODE, &pctx)) {
ext2fs_icount_store(ctx->inode_link_info, i, 0);
inode.i_links_count = 0;
@@ -51,8 +54,8 @@ static int disconnect_inode(e2fsck_t ctx, ext2_ino_t i)
e2fsck_read_bitmaps(ctx);
ext2fs_unmark_inode_bitmap(ctx->inode_used_map, i);
ext2fs_unmark_inode_bitmap(ctx->inode_dir_map, i);
- ext2fs_unmark_inode_bitmap(fs->inode_map, i);
- ext2fs_mark_ib_dirty(fs);
+ ext2fs_inode_alloc_stats2(fs, i, -1,
+ LINUX_S_ISDIR(inode.i_mode));
return 0;
}
}