From: Theodore Ts'o Date: Mon, 13 Aug 2001 14:58:41 +0000 (-0400) Subject: super.c (release_orphan_inodes): If the filesystem contains X-Git-Tag: E2FSPROGS-1_23~8 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=eb4ab51044706e52fc78907130f2cb9458a7023b;p=tools%2Fe2fsprogs.git super.c (release_orphan_inodes): If the filesystem contains errors, don't run the orphan * list, since the orphan list can't be trusted. --- diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index 1591c9a..93648c4 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -1,5 +1,9 @@ 2001-08-13 Theodore Tso + * 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. diff --git a/e2fsck/super.c b/e2fsck/super.c index 1e67d1c..ceac78b 100644 --- a/e2fsck/super.c +++ b/e2fsck/super.c @@ -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)) {