1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

cleanup: missing target_type check in device_is_usable filter

This commit is contained in:
Peter Rajnoha 2015-06-17 14:27:48 +02:00
parent 5577f2f4f0
commit 0a203070f5

View File

@ -638,7 +638,7 @@ int device_is_usable(struct device *dev, struct dev_usable_check_params check)
* correctly, not just snapshots but any cobimnation possible
* in a stack - use proper dm tree to check this instead.
*/
if (check.check_suspended &&
if (check.check_suspended && target_type &&
(!strcmp(target_type, "snapshot") || !strcmp(target_type, "snapshot-origin")) &&
_ignore_suspended_snapshot_component(dev)) {
log_debug_activation("%s: %s device %s not usable.", dev_name(dev), target_type, name);