Whamcloud - gitweb
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 4c40052..1591c9a 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 92cc105..2792df7 100644 (file)
@@ -128,6 +128,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
         * inode's additional i_block fields, there are some rare