Re: Weird ext2fs immortal directory bug (all-in-one)

From: Andreas Dilger (
Date: Thu Jul 26 2001 - 18:10:27 EST

Chris Wing writes:
> At the very least, ext2 fsck should complain about ext2 attributes set for
> symlinks or device files... I have had this same problem myself many times
> on machines with bad SCSI termination- I end up with unremovable device
> files thanks to a bogus immutable bit and have to use debugfs to get rid
> of them.

I checked, and at least recent versions of e2fsck complain/fix immutable
flags on device files, fifos, and sockets. The below check disallows
immutable or append-only flags on symlinks (on the grounds that it is not
possible to set these legally).

Now what I need to do is also add an e2fsck test case for this...

Cheers, Andreas
--- 1.56/e2fsck/pass1.c Thu Jul 19 14:31:24 2001
+++ edited/e2fsck/pass1.c Thu Jul 26 16:18:59 2001
@@ -559,6 +563,7 @@
                         check_size(ctx, &pctx);
                 } else if (LINUX_S_ISLNK (inode.i_mode)) {
+ check_immutable(ctx, &pctx);
                         if (!inode.i_blocks) {
                                 if (inode.i_size_high ||

Andreas Dilger
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Tue Jul 31 2001 - 21:00:30 EST