Skip to content

Commit

Permalink
Merge pull request #626 from arutk/vc_21.6.4
Browse files Browse the repository at this point in the history
[v21.6.4] fix volume close operation order
  • Loading branch information
Robert Baldyga authored Dec 22, 2021
2 parents 9e86f25 + 24d1d8b commit 2de39eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/ocf_volume.c
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,6 @@ static void ocf_volume_close_end(void *ctx)
env_completion *cmpl = ctx;

env_completion_complete(cmpl);
env_completion_destroy(cmpl);
}

void ocf_volume_close(ocf_volume_t volume)
Expand All @@ -338,6 +337,7 @@ void ocf_volume_close(ocf_volume_t volume)
ocf_refcnt_register_zero_cb(&volume->refcnt, ocf_volume_close_end,
&cmpl);
env_completion_wait(&cmpl);
env_completion_destroy(&cmpl);

volume->type->properties->ops.close(volume);
volume->opened = false;
Expand Down

0 comments on commit 2de39eb

Please # to comment.