If the client releases the AioCompletion while librbd is waiting
to acquire the exclusive lock, the memory associated with the
completion will be freed too early.
Fixes: #11478
Backport: hammer
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit
fd7723a1e62e682ac5a5279231a9fd6f5682bf94)
bool request_pending = !m_aio_requests.empty();
ldout(m_image_ctx.cct, 15) << "queuing aio request: " << c
<< dendl;
+
+ c->get();
m_aio_requests.push_back(std::make_pair(restart_op, c));
if (request_pending) {
return 0;
ldout(m_image_ctx.cct, 20) << "retrying aio request: " << iter->second
<< dendl;
iter->first(iter->second);
+ iter->second->put();
}
}