1
0
mirror of git://sourceware.org/git/lvm2.git synced 2025-01-03 05:18:29 +03:00

lvcreate: fix error path return values

Return failing error code for return path, as 'return 0' in this
case was returning success.
This commit is contained in:
Zdenek Kabelac 2022-11-08 12:39:25 +01:00
parent 0fed9b0971
commit b9f35e07db

View File

@ -1750,21 +1750,21 @@ static int _lvcreate_single(struct cmd_context *cmd, const char *vg_name,
goto_out;
if (seg_is_vdo(lp) && !_check_vdo_parameters(vg, lp, lcp))
return_0;
goto_out;
if (!_check_pool_parameters(cmd, vg, lp, lcp))
goto_out;
/* All types are checked */
if (!_check_zero_parameters(cmd, lp))
return_0;
goto_out;
if (!_update_extents_params(vg, lp, lcp))
goto_out;
if (seg_is_vdo(lp) && !check_vdo_constrains(cmd, (uint64_t)lp->extents * vg->extent_size,
lcp->virtual_size, &lp->vdo_params))
return_0;
goto_out;
if (seg_is_thin(lp) && !_validate_internal_thin_processing(lp))
goto_out;