diff --git a/fs/ext4/namei.c b/fs/ext4/namei.c index f2208337e5cb32e586f2416129ddc47acf1b2c66..f034326988e4db651087ffb24b7e1582efc19b46 100644 --- a/fs/ext4/namei.c +++ b/fs/ext4/namei.c @@ -1820,7 +1820,7 @@ static struct ext4_dir_entry_2 *do_split(handle_t *handle, struct inode *dir, split = count/2; hash2 = map[split].hash; - continued = hash2 == map[split - 1].hash; + continued = split > 0 ? hash2 == map[split - 1].hash : 0; dxtrace(printk(KERN_INFO "Split block %lu at %x, %i/%i\n", (unsigned long)dx_get_block(frame->at), hash2, split, count-split));