]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: remove unnecessary NULL pointer checks when searching extent maps
authorFilipe Manana <fdmanana@suse.com>
Mon, 19 Sep 2022 14:06:37 +0000 (15:06 +0100)
committerDavid Sterba <dsterba@suse.com>
Thu, 29 Sep 2022 15:08:31 +0000 (17:08 +0200)
commit53a8cbf4f53f4404d855ec2e5771f201fe6fadf7
tree97fec1656c30a2e6a1a0520f7a1b16216c552f1b
parent7d98e5e9bb6c04b76f0ada21ffaefef2ff5d2b38
btrfs: remove unnecessary NULL pointer checks when searching extent maps

The previous and next pointer arguments passed to __tree_search() are
never NULL as the only caller of this function, __lookup_extent_mapping(),
always passes the address of two on stack pointers. So remove the NULL
checks and add assertions to verify the pointers.

Signed-off-by: Filipe Manana <fdmanana@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_map.c