]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
e2fsck/pass1.c (e2fsck_pass1_check_device_inode): If i_blocks is
authorTheodore Ts'o <tytso@mit.edu>
Mon, 13 Aug 2001 10:15:36 +0000 (06:15 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Mon, 13 Aug 2001 10:15:36 +0000 (06:15 -0400)
non-zero, then assume that the device/socket/fifo inode
is bogus.

e2fsck/ChangeLog
e2fsck/pass1.c

index 4c40052cfcc318475275b7384a49044803e43626..1591c9a7411072ec7a90c69601b9659c9f791e11 100644 (file)
@@ -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  <tytso@valinux.com>
 
index 92cc105e182cc66ebec6f81f415740103abfb32a..2792df76d517f026e9e10d3610df345cabf303ee 100644 (file)
@@ -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