Skip to content

Commit 31cf0f2

Browse files
Eric Whitneytytso
authored andcommitted
ext4: delete path dealloc code in ext4_ext_handle_uninitialized_extents
Code deallocating the extent path referenced by an argument to ext4_ext_handle_uninitialized_extents was made redundant with identical code in its one caller, ext4_ext_map_blocks, by commit 3779473. Allocating and deallocating the path in the same function also makes the code clearer. Signed-off-by: Eric Whitney <enwlinux@gmail.com> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>
1 parent 38c03b3 commit 31cf0f2

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

fs/ext4/extents.c

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4005,10 +4005,6 @@ ext4_ext_handle_uninitialized_extents(handle_t *handle, struct inode *inode,
40054005
map->m_pblk = newblock;
40064006
map->m_len = allocated;
40074007
out2:
4008-
if (path) {
4009-
ext4_ext_drop_refs(path);
4010-
kfree(path);
4011-
}
40124008
return err ? err : allocated;
40134009
}
40144010

@@ -4208,7 +4204,7 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
42084204
err = ret;
42094205
else
42104206
allocated = ret;
4211-
goto out3;
4207+
goto out2;
42124208
}
42134209
}
42144210

@@ -4489,7 +4485,6 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
44894485
kfree(path);
44904486
}
44914487

4492-
out3:
44934488
trace_ext4_ext_map_blocks_exit(inode, flags, map,
44944489
err ? err : allocated);
44954490
ext4_es_lru_add(inode);

0 commit comments

Comments
 (0)