Btrfs: btrfs_get_extent: put btrfs_free_path ahead
PATCH 1/1 Btrfs: btrfs_get_extent: put btrfs_free_path ahead
trace_btrfs_get_extent() has nothing to do with path, place btrfs_free_path ahead so that we can unlock path on error.
Signed-off-by Liu Bo <[email protected]>
--- fs/btrfs/inode.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
fs/btrfs/inode.c +1 -1
@@ -7000,10 +7000,10 @@ struct extent_map *btrfs_get_extent(struct btrfs_inode *inode, err =btrfs_add_extent_mapping (fs_info, em_tree, &em, start, len);write_unlock (&em_tree->lock); out: +btrfs_free_path (path);trace_btrfs_get_extent (root, inode, em); -btrfs_free_path (path);if (err) {free_extent_map (em);return ERR_PTR (err);
Signature · 1 line
1.8.3.1
Quoted 4 lines · Liu Bo
trace_btrfs_get_extent()has nothing to do with path, placebtrfs_free_pathahead so that we can unlock path on error.Signed-off-by Liu Bo <[email protected]>
Reviewed-by David Sterba <[email protected]>