Fix standby detach

As the check added in commit a90839f286 tries to open the caching devcie
exclusively, it is impossible to detach cache from a standby instance.

Signed-off-by: Michal Mielewczyk <michal.mielewczyk@intel.com>
This commit is contained in:
Michal Mielewczyk 2022-07-04 10:21:48 +02:00
parent f97d8f3eff
commit a33896573e

View File

@ -2116,10 +2116,12 @@ int standby_handle() {
return FAILURE; return FAILURE;
} }
if (standby_params.subcmd != standby_opt_subcmd_detach) {
if (validate_cache_path(standby_params.cache_device, if (validate_cache_path(standby_params.cache_device,
standby_params.force) == FAILURE) { standby_params.force) == FAILURE) {
return FAILURE; return FAILURE;
} }
}
switch (standby_params.subcmd) { switch (standby_params.subcmd) {
case standby_opt_subcmd_init: case standby_opt_subcmd_init: