Prevents a race condition in journal replay when committing events
to the journal.
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
ictx->journal->commit_io_event(journal_tid, rval);
}
- // note: possible for image to be closed after op marked finished
done = true;
- if (async_op.started()) {
- async_op.finish_op();
- }
-
if (complete_cb) {
lock.Unlock();
complete_cb(rbd_comp, complete_arg);
ictx->event_socket.notify();
}
cond.Signal();
+
+ // note: possible for image to be closed after op marked finished
+ if (async_op.started()) {
+ async_op.finish_op();
+ }
tracepoint(librbd, aio_complete_exit);
}