Revert "fix deinitialization of moved composite volume"

The proper way to avoid calling on_deinit() callback on an already
deinitialized volume is to deinitialize type callbacks, as it is done
in the previous commit.

This reverts commit a7f70687a9.

Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
This commit is contained in:
Adam Rutkowski 2022-06-27 14:52:23 +02:00 committed by Robert Baldyga
parent b6587ad622
commit 364e36ec7e

View File

@ -152,11 +152,6 @@ static void ocf_composite_volume_on_deinit(ocf_volume_t cvolume)
struct ocf_composite_volume *composite = ocf_volume_get_priv(cvolume); struct ocf_composite_volume *composite = ocf_volume_get_priv(cvolume);
int i; int i;
/* priv can be NULL if this volume had been moved from. In this case
* it's the owner responsibility to deinit member volumes. */
if (!composite)
return;
for (i = 0; i < composite->members_cnt; i++) for (i = 0; i < composite->members_cnt; i++)
ocf_volume_deinit(&composite->member[i].volume); ocf_volume_deinit(&composite->member[i].volume);
} }