Skip to content

Commit

Permalink
librbd: potential race on image create request complete
Browse files Browse the repository at this point in the history
Fixes: http://tracker.ceph.com/issues/24910
Signed-off-by: Mykola Golub <mgolub@suse.com>
(cherry picked from commit d9e5cfa)
  • Loading branch information
trociny authored and smithfarm committed Sep 2, 2018
1 parent 42cfc1b commit f156199
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/librbd/image/CreateRequest.cc
Expand Up @@ -768,8 +768,9 @@ void CreateRequest<I>::complete(int r) {
}

m_data_io_ctx.close();
m_on_finish->complete(r);
auto on_finish = m_on_finish;
delete this;
on_finish->complete(r);
}

// cleanup
Expand Down

0 comments on commit f156199

Please sign in to comment.