fix bug in add-support-collapse-range
[ext4-patch-queue.git] / delete-path-delalloc-code-in-ext4_ext_handle_uninitialized_extents
bloba841540c24716b9280564bb5b4a351e39fbcf82b
1 ext4: delete path dealloc code in ext4_ext_handle_uninitialized_extents
3 From: Eric Whitney <enwlinux@gmail.com>
5 Code deallocating the extent path referenced by an argument to
6 ext4_ext_handle_uninitialized_extents was made redundant with identical
7 code in its one caller, ext4_ext_map_blocks, by commit 3779473246.
8 Allocating and deallocating the path in the same function also makes
9 the code clearer.
11 Signed-off-by: Eric Whitney <enwlinux@gmail.com>
12 Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
13 ---
14  fs/ext4/extents.c | 7 +------
15  1 file changed, 1 insertion(+), 6 deletions(-)
17 diff --git a/fs/ext4/extents.c b/fs/ext4/extents.c
18 index ef4b535..cca976b 100644
19 --- a/fs/ext4/extents.c
20 +++ b/fs/ext4/extents.c
21 @@ -4006,10 +4006,6 @@ out1:
22         map->m_pblk = newblock;
23         map->m_len = allocated;
24  out2:
25 -       if (path) {
26 -               ext4_ext_drop_refs(path);
27 -               kfree(path);
28 -       }
29         return err ? err : allocated;
30  }
32 @@ -4209,7 +4205,7 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
33                                 err = ret;
34                         else
35                                 allocated = ret;
36 -                       goto out3;
37 +                       goto out2;
38                 }
39         }
41 @@ -4490,7 +4486,6 @@ out2:
42                 kfree(path);
43         }
45 -out3:
46         trace_ext4_ext_map_blocks_exit(inode, flags, map,
47                                        err ? err : allocated);
48         ext4_es_lru_add(inode);
49 -- 
50 1.8.3.2