Commit 31cf0f2c authored by Eric Whitney's avatar Eric Whitney Committed by Theodore Ts'o

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 37794732.
Allocating and deallocating the path in the same function also makes
the code clearer.
Signed-off-by: default avatarEric Whitney <enwlinux@gmail.com>
Signed-off-by: default avatar"Theodore Ts'o" <tytso@mit.edu>
parent 38c03b34
...@@ -4005,10 +4005,6 @@ ext4_ext_handle_uninitialized_extents(handle_t *handle, struct inode *inode, ...@@ -4005,10 +4005,6 @@ ext4_ext_handle_uninitialized_extents(handle_t *handle, struct inode *inode,
map->m_pblk = newblock; map->m_pblk = newblock;
map->m_len = allocated; map->m_len = allocated;
out2: out2:
if (path) {
ext4_ext_drop_refs(path);
kfree(path);
}
return err ? err : allocated; return err ? err : allocated;
} }
...@@ -4208,7 +4204,7 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode, ...@@ -4208,7 +4204,7 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
err = ret; err = ret;
else else
allocated = ret; allocated = ret;
goto out3; goto out2;
} }
} }
...@@ -4489,7 +4485,6 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode, ...@@ -4489,7 +4485,6 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
kfree(path); kfree(path);
} }
out3:
trace_ext4_ext_map_blocks_exit(inode, flags, map, trace_ext4_ext_map_blocks_exit(inode, flags, map,
err ? err : allocated); err ? err : allocated);
ext4_es_lru_add(inode); ext4_es_lru_add(inode);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment