aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/extents.c
diff options
context:
space:
mode:
authorThiemo Nagel <thiemo.nagel@ph.tum.de>2009-04-04 23:30:44 -0400
committerTheodore Ts'o <tytso@mit.edu>2009-04-04 23:30:44 -0400
commite44543b83bf4ab84dc6bd5b88158c78b1ed1c208 (patch)
treec55b92d612db9175125ca0edc33af3ff6dcc16d3 /fs/ext4/extents.c
parentf73953c0656f2db9073c585c4df2884a8ecd101e (diff)
ext4: Fix off-by-one-error in ext4_valid_extent_idx()
Signed-off-by: Thiemo Nagel <thiemo.nagel@ph.tum.de> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
Diffstat (limited to 'fs/ext4/extents.c')
-rw-r--r--fs/ext4/extents.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index ac77d8b8251d..6132353dcf62 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -342,7 +342,7 @@ static int ext4_valid_extent_idx(struct inode *inode,
342 ext4_fsblk_t block = idx_pblock(ext_idx); 342 ext4_fsblk_t block = idx_pblock(ext_idx);
343 struct ext4_super_block *es = EXT4_SB(inode->i_sb)->s_es; 343 struct ext4_super_block *es = EXT4_SB(inode->i_sb)->s_es;
344 if (unlikely(block < le32_to_cpu(es->s_first_data_block) || 344 if (unlikely(block < le32_to_cpu(es->s_first_data_block) ||
345 (block > ext4_blocks_count(es)))) 345 (block >= ext4_blocks_count(es))))
346 return 0; 346 return 0;
347 else 347 else
348 return 1; 348 return 1;