]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
super.c (release_orphan_inodes): If the filesystem contains
authorTheodore Ts'o <tytso@mit.edu>
Mon, 13 Aug 2001 14:58:41 +0000 (10:58 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 13 Aug 2001 14:58:41 +0000 (10:58 -0400)
errors, don't run the orphan * list, since the orphan list
can't be trusted.

e2fsck/ChangeLog
e2fsck/super.c

index 1591c9a7411072ec7a90c69601b9659c9f791e11..93648c42be9b68b40179310c36b9de8629cab7e0 100644 (file)
@@ -1,5 +1,9 @@
 2001-08-13  Theodore Tso  <tytso@valinux.com>
 
+       * super.c (release_orphan_inodes): If the filesystem contains
+               errors, don't run the orphan * list, since the orphan list
+               can't be trusted.
+
        * pass1.c (check_size): Fix logic in check_size; the previous code
                only offered to clear the inode size fields if both size
                and i_size_high were zero.
index 1e67d1c61c6f3b51ba9d5ccc7b71201352ef71d7..ceac78b04953820b29e46da48a40ff8159e434b1 100644 (file)
@@ -237,6 +237,14 @@ static int release_orphan_inodes(e2fsck_t ctx)
         */
        fs->super->s_last_orphan = 0;
        ext2fs_mark_super_dirty(fs);
+
+       /*
+        * If the filesystem contains errors, don't run the orphan
+        * list, since the orphan list can't be trusted; and we're
+        * going to be running a full e2fsck run anyway...
+        */
+       if (fs->super->s_state & EXT2_ERROR_FS)
+               return 0;
        
        if ((ino < EXT2_FIRST_INODE(fs->super)) ||
            (ino > fs->super->s_inodes_count)) {