From: Theodore Ts'o Date: Mon, 13 Aug 2001 10:15:36 +0000 (-0400) Subject: e2fsck/pass1.c (e2fsck_pass1_check_device_inode): If i_blocks is X-Git-Tag: E2FSPROGS-1_23~9 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a40ecbb1fc4811201c6ab40292ac3aef1bca54af;p=thirdparty%2Fe2fsprogs.git e2fsck/pass1.c (e2fsck_pass1_check_device_inode): If i_blocks is non-zero, then assume that the device/socket/fifo inode is bogus. --- diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index 4c40052cf..1591c9a74 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -3,6 +3,9 @@ * 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. + (e2fsck_pass1_check_device_inode): If i_blocks is + non-zero, then assume that the device/socket/fifo inode + is bogus. 2001-08-09 Theodore Tso diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index 92cc105e1..2792df76d 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -127,6 +127,11 @@ int e2fsck_pass1_check_device_inode(struct ext2_inode *inode) { int i; + /* + * If i_blocks is non-zero, then this is a bogus device/fifo/socket + */ + if (inode->i_blocks) + return 1; /* * We should be able to do the test below all the time, but * because the kernel doesn't forcibly clear the device