Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e44543b8 authored by Thiemo Nagel's avatar Thiemo Nagel Committed by Theodore Ts'o
Browse files

ext4: Fix off-by-one-error in ext4_valid_extent_idx()

parent f73953c0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;