Commit 324e3261 authored by Marcin Spiewak's avatar Marcin Spiewak Committed by Konrad Sztyber
Browse files

lib/lvol: lvs_load() shall return, if options are invalid



lvs_load() function verifies if options passed to it
are valid, but doesn't return, if they are not (only error
is logged and callback is called with -EINVAL code). Now
it is corrected and the function ends after the error
is reported.

Change-Id: I19b0b22466b6980345477f62084d27ef13414752
Signed-off-by: default avatarMarcin Spiewak <marcin.spiewak@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/17582


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarMike Gerdts <mgerdts@nvidia.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
parent c5efdd55
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -422,6 +422,7 @@ lvs_load(struct spdk_bs_dev *bs_dev, const struct spdk_lvs_opts *_lvs_opts,
		if (lvs_opts_copy(_lvs_opts, &lvs_opts) != 0) {
			SPDK_ERRLOG("Invalid options\n");
			cb_fn(cb_arg, NULL, -EINVAL);
			return;
		}
	}