diff options
Diffstat (limited to 'extlinux.c')
-rw-r--r-- | extlinux.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -349,14 +349,16 @@ ext4_find_leaf (struct ext4_extent_header *eh, __u32 block) while (1) { - index = EXT4_FIRST_INDEX(eh); - if (eh->eh_magic != EXT4_EXT_MAGIC) return NULL; + /* got it */ if (eh->eh_depth == 0) return eh; + index = EXT4_FIRST_INDEX(eh); + + for ( i = 0; i < eh->eh_entries; i++ ) { if ( block < index[i].ei_block ) break; |