Skip to content

Commit

Permalink
fix volume_close completion order
Browse files Browse the repository at this point in the history
Signed-off-by: Bob Chen <beef9999@qq.com>
Signed-off-by: Adam Rutkowski <adam.j.rutkowski@intel.com>
  • Loading branch information
beef9999 authored and Adam Rutkowski committed Dec 22, 2021
1 parent 9e86f25 commit 24d1d8b
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 24d1d8b

Please sign in to comment.