]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: fix nullptr dereference in MDCache::finish_rollback
authorYan, Zheng <zyan@redhat.com>
Tue, 14 Jul 2020 12:40:11 +0000 (20:40 +0800)
committerYan, Zheng <zyan@redhat.com>
Tue, 14 Jul 2020 12:45:12 +0000 (20:45 +0800)
introduced by commit 4940ab62e0d
"mds: preserve ESlaveUpdate::OP_PREPARE logevent before doing commit"

Fixes: https://tracker.ceph.com/issues/46533
Signed-off-by: "Yan, Zheng" <zyan@redhat.com>
src/mds/MDCache.cc

index caf7cf1c10e371adb6e46afa3d9a03c9cdde0636..f6ba2d4aacb62f8f01804e8ad6cfc95e7af78306 100644 (file)
@@ -3605,7 +3605,7 @@ MDSlaveUpdate* MDCache::get_uncommitted_slave(metareqid_t reqid, mds_rank_t mast
 }
 
 void MDCache::finish_rollback(metareqid_t reqid, MDRequestRef& mdr) {
-  auto p = resolve_need_rollback.find(mdr->reqid);
+  auto p = resolve_need_rollback.find(reqid);
   ceph_assert(p != resolve_need_rollback.end());
   if (mds->is_resolve()) {
     finish_uncommitted_slave(reqid, false);