From b1f204f7f9f5d318c27c7719491933a0e49140ac Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Thu, 30 Aug 2001 16:42:09 -0400 Subject: [PATCH] pass1.c (e2fsck_pass1): For EXT2_RESIZE_INO, allow its i_mode to either be zero or a regular file (for compatibility with Andreas's on-line resizing programs). --- e2fsck/ChangeLog | 6 ++++++ e2fsck/pass1.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index 18a142f..6d006ce 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -1,3 +1,9 @@ +2001-08-30 Theodore Tso + + * pass1.c (e2fsck_pass1): For EXT2_RESIZE_INO, allow its i_mode to + either be zero or a regular file (for compatibility with + Andreas's on-line resizing programs). + 2001-08-27 Theodore Tso * unix.c (main): Remove EXT2FS_VERSION from the version display, diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index 085999a..a8d332a 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -482,6 +482,10 @@ void e2fsck_pass1(e2fsck_t ctx) if (ino == EXT2_BOOT_LOADER_INO) { if (LINUX_S_ISDIR(inode.i_mode)) problem = PR_1_RESERVED_BAD_MODE; + } else if (ino == EXT2_RESIZE_INO) { + if (inode.i_mode && + !LINUX_S_ISREG(inode.i_mode)) + problem = PR_1_RESERVED_BAD_MODE; } else { if (inode.i_mode != 0) problem = PR_1_RESERVED_BAD_MODE; -- 1.8.3.1