Skip to content

Commit

Permalink
ext4: delete path dealloc code in ext4_ext_handle_uninitialized_extents
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Eric Whitney authored and Theodore Ts'o committed Mar 14, 2014
1 parent 38c03b3 commit 31cf0f2
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions fs/ext4/extents.c
Original file line number Diff line number Diff line change
Expand Up @@ -4005,10 +4005,6 @@ ext4_ext_handle_uninitialized_extents(handle_t *handle, struct inode *inode,
map->m_pblk = newblock;
map->m_len = allocated;
out2:
if (path) {
ext4_ext_drop_refs(path);
kfree(path);
}
return err ? err : allocated;
}

Expand Down Expand Up @@ -4208,7 +4204,7 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
err = ret;
else
allocated = ret;
goto out3;
goto out2;
}
}

Expand Down Expand Up @@ -4489,7 +4485,6 @@ int ext4_ext_map_blocks(handle_t *handle, struct inode *inode,
kfree(path);
}

out3:
trace_ext4_ext_map_blocks_exit(inode, flags, map,
err ? err : allocated);
ext4_es_lru_add(inode);
Expand Down

0 comments on commit 31cf0f2

Please sign in to comment.