Skip to content

Commit

Permalink
btrfs: Remove redundant assignment in btrfs_get_extent_fiemap
Browse files Browse the repository at this point in the history
hole_len is only used if the hole falls within the requested range. Make
that explicitly clear by only assigning in the corresponding branch.

Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de>
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
  • Loading branch information
Nikolay Borisov authored and David Sterba committed Feb 25, 2019
1 parent f3714ef commit 02950af
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -7005,7 +7005,7 @@ struct extent_map *btrfs_get_extent_fiemap(struct btrfs_inode *inode,

if (delalloc_len > 0) {
u64 hole_start;
u64 hole_len = len;
u64 hole_len;
const u64 hole_end = extent_map_end(hole_em);

em = alloc_extent_map();
Expand Down

0 comments on commit 02950af

Please sign in to comment.