Whamcloud - gitweb
valid_blk.c (ext2fs_inode_has_valid_blocks): Fix bug which
authorTheodore Ts'o <tytso@mit.edu>
Tue, 20 Aug 2002 05:14:30 +0000 (01:14 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 20 Aug 2002 05:14:30 +0000 (01:14 -0400)
failed to accurately characterize non-standard slow
symlinks.  (Which don't appear in practice on real-life
systems, fortunately.)

lib/ext2fs/ChangeLog
lib/ext2fs/valid_blk.c

index 123d85e..7337c53 100644 (file)
@@ -1,3 +1,10 @@
+2002-08-20  Theodore Ts'o  <tytso@mit.edu>
+
+       * valid_blk.c (ext2fs_inode_has_valid_blocks): Fix bug which
+               failed to accurately characterize non-standard slow
+               symlinks.  (Which don't appear in practice on real-life
+               systems, fortunately.)
+
 2002-08-17  Theodore Ts'o  <tytso@mit.edu>
 
        * Makefile.in: Remove inode_io.o from the standard object files,
index 5236f1e..29ff27a 100644 (file)
@@ -47,8 +47,8 @@ int ext2fs_inode_has_valid_blocks(struct ext2_inode *inode)
                        /* With an EA block, life gets more tricky */
                        if (inode->i_size >= EXT2_N_BLOCKS*4)
                                return 1; /* definitely using i_block[] */
-                       if (inode->i_size > 3 && inode->i_block[1] != 0)
-                               return 1; /* probably using i_block[] */
+                       if (inode->i_size > 4 && inode->i_block[1] == 0)
+                               return 1; /* definitely using i_block[] */
                        return 0; /* Probably a fast symlink */
                }
        }