Skip to content

Commit

Permalink
ext4: Fix off-by-one-error in ext4_valid_extent_idx()
Browse files Browse the repository at this point in the history
Signed-off-by: Thiemo Nagel <thiemo.nagel@ph.tum.de>
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
  • Loading branch information
Thiemo Nagel authored and Theodore Ts'o committed Apr 5, 2009
1 parent f73953c commit e44543b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/ext4/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ static int ext4_valid_extent_idx(struct inode *inode,
ext4_fsblk_t block = idx_pblock(ext_idx);
struct ext4_super_block *es = EXT4_SB(inode->i_sb)->s_es;
if (unlikely(block < le32_to_cpu(es->s_first_data_block) ||
(block > ext4_blocks_count(es))))
(block >= ext4_blocks_count(es))))
return 0;
else
return 1;
Expand Down

0 comments on commit e44543b

Please sign in to comment.