]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commit - fs/btrfs/inode.c
btrfs: remove redundant check in btrfs_get_extent_fiemap
authorNikolay Borisov <nborisov@suse.com>
Fri, 1 Dec 2017 09:19:43 +0000 (11:19 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 22 Jan 2018 15:08:15 +0000 (16:08 +0100)
commitbf8d32b9b3c5fb183aa4ac5cb7bae9580dcb0dfb
tree497312563a35f1c4baf72c530781b631a8096f92
parent5c9a702ed1724f1c856c7299fe1faf9b3b5b4eb0
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>
fs/btrfs/inode.c