Clarify clean up path of empty dm_target structure.

This commit is contained in:
Ondrej Kozina
2022-04-22 13:01:13 +02:00
committed by Milan Broz
parent f391f4baf1
commit 5a8b95aa45
2 changed files with 4 additions and 1 deletions

View File

@@ -1597,6 +1597,9 @@ static void _dm_target_free_query_path(struct crypt_device *cd, struct dm_target
static void _dm_target_erase(struct crypt_device *cd, struct dm_target *tgt)
{
if (tgt->direction == TARGET_EMPTY)
return;
if (tgt->direction == TARGET_QUERY)
_dm_target_free_query_path(cd, tgt);