From: Peter Rajnoha Date: Mon, 8 Jun 2020 13:41:35 +0000 (+0200) Subject: blkdeactivate: add missing VDO_AVAILABLE check in deactivate_vdo X-Git-Tag: v2_03_10~56 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=8806f2d5ed4792042b246b930fb44f24b9ee45c2;p=lvm2.git blkdeactivate: add missing VDO_AVAILABLE check in deactivate_vdo --- diff --git a/scripts/blkdeactivate.sh.in b/scripts/blkdeactivate.sh.in index 57b3e58bf..7c517b87b 100644 --- a/scripts/blkdeactivate.sh.in +++ b/scripts/blkdeactivate.sh.in @@ -330,6 +330,12 @@ deactivate_vdo() { test -b "$DEV_DIR/mapper/$xname" || return 0 test -z "${SKIP_DEVICE_LIST["$kname"]}" || return 1 + # Skip VDO device deactivation if VDO tools missing. + test "$VDO_AVAILABLE" -eq 0 && { + add_device_to_skip_list + return 1 + } + deactivate_holders "$DEV_DIR/mapper/$xname" || return 1 echo -n " [VDO]: deactivating VDO volume $xname... "