summaryrefslogtreecommitdiff
path: root/fs/btrfs/inode.c
diff options
context:
space:
mode:
authorNikolay Borisov <nborisov@suse.com>2017-12-01 11:19:43 +0200
committerDavid Sterba <dsterba@suse.com>2018-01-22 16:08:15 +0100
commitbf8d32b9b3c5fb183aa4ac5cb7bae9580dcb0dfb (patch)
tree497312563a35f1c4baf72c530781b631a8096f92 /fs/btrfs/inode.c
parent5c9a702ed1724f1c856c7299fe1faf9b3b5b4eb0 (diff)
btrfs: remove redundant check in btrfs_get_extent_fiemap
Before returning hole_em in btrfs_get_fiemap_extent we check if it's different than null. However, by the time this null check is triggered we already know hole_em is not null because it means it points to the em we found and it has already been dereferenced. Signed-off-by: Nikolay Borisov <nborisov@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/inode.c')
-rw-r--r--fs/btrfs/inode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c
index 8b6c59a068d2..034d7333b14d 100644
--- a/fs/btrfs/inode.c
+++ b/fs/btrfs/inode.c
@@ -7305,7 +7305,7 @@ struct extent_map *btrfs_get_extent_fiemap(struct btrfs_inode *inode,
em->block_start = EXTENT_MAP_DELALLOC;
em->block_len = found;
}
- } else if (hole_em) {
+ } else {
return hole_em;
}
out: