Merge pull request #14091 from trociny/wip-prepare_async_request

librbd: potential use of uninitialised value in ImageWatcher

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
This commit is contained in:
Jason Dillaman 2017-03-25 16:21:00 -04:00 committed by GitHub
commit 70f34cc64d

View File

@ -651,7 +651,7 @@ bool ImageWatcher<I>::handle_payload(const FlattenPayload &payload,
ProgressContext *prog_ctx;
r = prepare_async_request(payload.async_request_id, &new_request,
&ctx, &prog_ctx);
if (new_request) {
if (r == 0 && new_request) {
ldout(m_image_ctx.cct, 10) << this << " remote flatten request: "
<< payload.async_request_id << dendl;
m_image_ctx.operations->execute_flatten(*prog_ctx, ctx);
@ -677,7 +677,7 @@ bool ImageWatcher<I>::handle_payload(const ResizePayload &payload,
ProgressContext *prog_ctx;
r = prepare_async_request(payload.async_request_id, &new_request,
&ctx, &prog_ctx);
if (new_request) {
if (r == 0 && new_request) {
ldout(m_image_ctx.cct, 10) << this << " remote resize request: "
<< payload.async_request_id << " "
<< payload.size << " "
@ -812,7 +812,7 @@ bool ImageWatcher<I>::handle_payload(const RebuildObjectMapPayload& payload,
ProgressContext *prog_ctx;
r = prepare_async_request(payload.async_request_id, &new_request,
&ctx, &prog_ctx);
if (new_request) {
if (r == 0 && new_request) {
ldout(m_image_ctx.cct, 10) << this
<< " remote rebuild object map request: "
<< payload.async_request_id << dendl;