]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
Objecter: set c->session to NULL if acting is empty
authorSamuel Just <sam.just@inktank.com>
Tue, 30 Jul 2013 22:46:22 +0000 (15:46 -0700)
committerSamuel Just <sam.just@inktank.com>
Tue, 30 Jul 2013 22:52:38 +0000 (15:52 -0700)
Otherwise, we might leave a session attached to the
CommandOp for an down OSD.  handle_osd_map will then
delete the session for the down OSD.  tick() will then
attempt to follow the invalid pointer to find a
connection over which to send a MPing.

Fixes: #5798
Signed-off-by: Samuel Just <sam.just@inktank.com>
Reviewed-by: Sage Weil <sage@inktank.com>
src/osdc/Objecter.cc

index e07d0626d21e4e0507be358f809ccabbd53232c3..8ec1374ec4fe66e95221def0d5eeed533c2aea72 100644 (file)
@@ -2450,6 +2450,7 @@ int Objecter::recalc_command_target(CommandOp *c)
       c->session = s;
       s->command_ops.push_back(&c->session_item);
     } else {
+      c->session = NULL;
       num_homeless_ops++;
     }
     return RECALC_OP_TARGET_NEED_RESEND;