Skip to content

Commit

Permalink
Merge pull request #7992: hammer: segfault in Objecter::handle_watch_…
Browse files Browse the repository at this point in the history
…notify

Reviewed-by: Loic Dachary <ldachary@redhat.com>
  • Loading branch information
Loic Dachary committed Apr 5, 2016
2 parents af09e99 + 38b9c0b commit 2dbb216
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/osdc/Objecter.cc
Expand Up @@ -801,10 +801,13 @@ void Objecter::handle_watch_notify(MWatchNotify *m)
info->notify_id != m->notify_id) {
ldout(cct, 10) << __func__ << " reply notify " << m->notify_id
<< " != " << info->notify_id << ", ignoring" << dendl;
} else {
assert(info->on_notify_finish);
} else if (info->on_notify_finish) {
info->notify_result_bl->claim(m->get_data());
info->on_notify_finish->complete(m->return_code);

// if we race with reconnect we might get a second notify; only
// notify the caller once!
info->on_notify_finish = NULL;
}
} else {
finisher->queue(new C_DoWatchNotify(this, info, m));
Expand Down

0 comments on commit 2dbb216

Please sign in to comment.