]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Rework error handling of add_extent_mapping in __btrfs_alloc_chunk
authorNikolay Borisov <nborisov@suse.com>
Mon, 21 Aug 2017 09:43:49 +0000 (12:43 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 30 Oct 2017 11:27:56 +0000 (12:27 +0100)
commit61bd4154eb26d5138a4811b4e34e808b63f63933
treea1931a745d6a5a70bd15239f35bd57849bf72e50
parent7a63568e6cb05868d744d6bd70a52048740e7391
btrfs: Rework error handling of add_extent_mapping in __btrfs_alloc_chunk

Currently the code executes add_extent_mapping and if it is successful
it links the new mapping, it then proceeds to unlock the extent mapping
tree and check for failure and handle them. Instead, rework the code to
only perform a single check if add_extent_mapping has failed and handle
it, otherwise the code continues in a linear fashion. No functional
changes

Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: Josef Bacik <jbacik@fb.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/volumes.c