]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
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 123d85eaefd22261b04d5c55f28b6ce2783c8597..7337c53f44cb2fb9cf3ff21f8350bcf0add6e4bc 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 5236f1e3ecf33b3bfcae12a99444134178859695..29ff27a7cf67c35c17373a3a0edcb7064fc2a171 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 */
                }
        }