Skip to content

Commit

Permalink
Merge pull request #14091 from trociny/wip-prepare_async_request
Browse files Browse the repository at this point in the history
librbd: potential use of uninitialised value in ImageWatcher

Reviewed-by: Jason Dillaman <dillaman@redhat.com>
  • Loading branch information
Jason Dillaman committed Mar 25, 2017
2 parents 49d0003 + 2d5fb61 commit 70f34cc
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/librbd/ImageWatcher.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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 << " "
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 70f34cc

Please sign in to comment.