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>
  • Loading branch information
trociny committed Aug 18, 2018
1 parent 4573c74 commit d9e5cfa
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/librbd/image/CreateRequest.cc
Expand Up @@ -737,8 +737,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 d9e5cfa

Please sign in to comment.