Re: [PATCH 3/4] btrfs: Consolidate error checking for btrfs_alloc_chunk

2018-04-16 Thread David Sterba
On Wed, Apr 11, 2018 at 11:21:19AM +0300, Nikolay Borisov wrote: > 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-of

[PATCH 3/4] btrfs: Consolidate error checking for btrfs_alloc_chunk

2018-04-11 Thread Nikolay Borisov
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 --- fs/btrfs/extent-tree.c | 12 +++- 1 file