errors, don't run the orphan * list, since the orphan list
can't be trusted.
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.
*/
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)) {