Skip to content

Commit

Permalink
librados: fix potential race condition if notify immediately fails
Browse files Browse the repository at this point in the history
Fixes: http://tracker.ceph.com/issues/23966
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
  • Loading branch information
Jason Dillaman committed May 7, 2018
1 parent 574906d commit a74e888
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librados/IoCtxImpl.cc
Expand Up @@ -1828,7 +1828,6 @@ int librados::IoCtxImpl::notify(const object_t& oid, bufferlist& bl,
Context *notify_finish = new C_notify_Finish(client->cct, &notify_finish_cond,
objecter, linger_op, preply_bl,
preply_buf, preply_buf_len);
(void) notify_finish;

uint32_t timeout = notify_timeout;
if (timeout_ms)
Expand Down Expand Up @@ -1860,6 +1859,7 @@ int librados::IoCtxImpl::notify(const object_t& oid, bufferlist& bl,
} else {
ldout(client->cct, 10) << __func__ << " failed to initiate notify, r = "
<< r << dendl;
notify_finish_cond.wait();
}

objecter->linger_cancel(linger_op);
Expand Down

0 comments on commit a74e888

Please sign in to comment.