From ee504128d34315b579d34fad8e9a3b1f80ffc00e Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Tue, 20 Aug 2002 01:14:30 -0400 Subject: [PATCH] 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.) --- lib/ext2fs/ChangeLog | 7 +++++++ lib/ext2fs/valid_blk.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/ext2fs/ChangeLog b/lib/ext2fs/ChangeLog index 123d85e..7337c53 100644 --- a/lib/ext2fs/ChangeLog +++ b/lib/ext2fs/ChangeLog @@ -1,3 +1,10 @@ +2002-08-20 Theodore Ts'o + + * 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 * Makefile.in: Remove inode_io.o from the standard object files, diff --git a/lib/ext2fs/valid_blk.c b/lib/ext2fs/valid_blk.c index 5236f1e..29ff27a 100644 --- a/lib/ext2fs/valid_blk.c +++ b/lib/ext2fs/valid_blk.c @@ -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 */ } } -- 1.8.3.1