]> git.baikalelectronics.ru Git - kernel.git/commit
btrfs: Consolidate error checking for btrfs_alloc_chunk
authorNikolay Borisov <nborisov@suse.com>
Wed, 11 Apr 2018 08:21:19 +0000 (11:21 +0300)
committerDavid Sterba <dsterba@suse.com>
Mon, 28 May 2018 16:07:16 +0000 (18:07 +0200)
commit15a603520584b1e808d7f0584af24c1a8409aae5
tree282ee278af32801674291de04fbab6ad5895aa42
parent88c199673154a7e7ce0c877e4b9712a7b354d63b
btrfs: Consolidate error checking for btrfs_alloc_chunk

The second if is really a subcase of ret being less than 0. So
introduce a generic if (ret < 0) check, and inside have another if
which explicitly handles the -ENOSPC and any other errors. No
functional changes.

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/extent-tree.c