1 ext4: fix error handling in ext4_ext_shift_extents
3 From: Dmitry Monakhov <dmonakhov@openvz.org>
5 Fix error handling by adding some. :-)
7 Signed-off-by: Dmitry Monakhov <dmonakhov@openvz.org>
8 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
10 fs/ext4/extents.c | 11 +++++++++--
11 1 files changed, 9 insertions(+), 2 deletions(-)
13 diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
14 index 96e0a4b..38be063 100644
15 --- a/fs/ext4/extents.c
16 +++ b/fs/ext4/extents.c
17 @@ -5314,11 +5314,18 @@ ext4_ext_shift_extents(struct inode *inode, handle_t *handle,
18 * enough to accomodate the shift.
20 path = ext4_ext_find_extent(inode, start - 1, NULL, 0);
22 + return PTR_ERR(path);
23 depth = path->p_depth;
24 extent = path[depth].p_ext;
25 - ex_start = le32_to_cpu(extent->ee_block);
26 - ex_end = le32_to_cpu(extent->ee_block) +
28 + ex_start = le32_to_cpu(extent->ee_block);
29 + ex_end = le32_to_cpu(extent->ee_block) +
30 ext4_ext_get_actual_len(extent);
35 ext4_ext_drop_refs(path);