aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ext4/extents.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ext4/extents.c')
-rw-r--r--fs/ext4/extents.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
index 96e0a4bc8faa..38be06354b88 100644
--- a/fs/ext4/extents.c
+++ b/fs/ext4/extents.c
@@ -5314,11 +5314,18 @@ ext4_ext_shift_extents(struct inode *inode, handle_t *handle,
5314 * enough to accomodate the shift. 5314 * enough to accomodate the shift.
5315 */ 5315 */
5316 path = ext4_ext_find_extent(inode, start - 1, NULL, 0); 5316 path = ext4_ext_find_extent(inode, start - 1, NULL, 0);
5317 if (IS_ERR(path))
5318 return PTR_ERR(path);
5317 depth = path->p_depth; 5319 depth = path->p_depth;
5318 extent = path[depth].p_ext; 5320 extent = path[depth].p_ext;
5319 ex_start = le32_to_cpu(extent->ee_block); 5321 if (extent) {
5320 ex_end = le32_to_cpu(extent->ee_block) + 5322 ex_start = le32_to_cpu(extent->ee_block);
5323 ex_end = le32_to_cpu(extent->ee_block) +
5321 ext4_ext_get_actual_len(extent); 5324 ext4_ext_get_actual_len(extent);
5325 } else {
5326 ex_start = 0;
5327 ex_end = 0;
5328 }
5322 ext4_ext_drop_refs(path); 5329 ext4_ext_drop_refs(path);
5323 kfree(path); 5330 kfree(path);
5324 5331