]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
mds: fix failed assertion in MDCache::maybe_resolve_finish 12098/head
authorYan, Zheng <zyan@redhat.com>
Mon, 21 Nov 2016 12:27:40 +0000 (20:27 +0800)
committerYan, Zheng <zyan@redhat.com>
Mon, 21 Nov 2016 12:42:31 +0000 (20:42 +0800)
It's possible mds's state is RESOLVE and mds's want_state is
RECONNCT or STATE_REJOIN. MDCache::resolve_done is null in that
case.

Signed-off-by: Yan, Zheng <zyan@redhat.com>
src/mds/MDCache.cc

index 06e7520b865bc4addbf3b1a2225a1487eb3b3e1a..f327e04e49db6fbd51a2fe5ea659d56d6b5ea3b3 100644 (file)
@@ -3317,10 +3317,11 @@ void MDCache::maybe_resolve_finish()
   dout(10) << "maybe_resolve_finish got all resolves+resolve_acks, done." << dendl;
   disambiguate_imports();
   finish_committed_masters();
-  if (mds->is_resolve()) {
+
+  if (resolve_done) {
+    assert(mds->is_resolve());
     trim_unlinked_inodes();
     recalc_auth_bits(false);
-    assert(resolve_done != NULL);
     resolve_done->complete(0);
     resolve_done = NULL;
   } else {