aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4')
-rw-r--r--fs/ext4/extents.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 02a4d80573a1..797b63b59740 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -1392,7 +1392,8 @@ ext4_ext_next_allocated_block(struct ext4_ext_path *path)
1392 while (depth >= 0) { 1392 while (depth >= 0) {
1393 if (depth == path->p_depth) { 1393 if (depth == path->p_depth) {
1394 /* leaf */ 1394 /* leaf */
1395 if (path[depth].p_ext != 1395 if (path[depth].p_ext &&
1396 path[depth].p_ext !=
1396 EXT_LAST_EXTENT(path[depth].p_hdr)) 1397 EXT_LAST_EXTENT(path[depth].p_hdr))
1397 return le32_to_cpu(path[depth].p_ext[1].ee_block); 1398 return le32_to_cpu(path[depth].p_ext[1].ee_block);
1398 } else { 1399 } else {