]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
mds: finish request before completing internal req
authorPatrick Donnelly <pdonnell@redhat.com>
Tue, 13 Feb 2024 21:07:37 +0000 (16:07 -0500)
committerPatrick Donnelly <pdonnell@redhat.com>
Fri, 22 Mar 2024 15:38:02 +0000 (11:38 -0400)
Importantly, this marks the request dead so it cannot be killed.

Signed-off-by: Patrick Donnelly <pdonnell@redhat.com>
(cherry picked from commit c944eadaf6987a812e738459214872af1ff7678a)

src/mds/Server.cc

index 186882caed1b953d65c600f6358a7d880b76bfd4..b27cd2bdbc2445c59a450f8f27693ec4815e9b0a 100644 (file)
@@ -2083,10 +2083,11 @@ void Server::respond_to_request(const MDRequestRef& mdr, int r)
     }
   } else if (mdr->internal_op > -1) {
     dout(10) << __func__ << ": completing with result " << cpp_strerror(r) << " on internal " << *mdr << dendl;
-    if (!mdr->internal_op_finish)
+    auto c = mdr->internal_op_finish;
+    if (!c)
       ceph_abort_msg("trying to respond to internal op without finisher");
-    mdr->internal_op_finish->complete(r);
     mdcache->request_finish(mdr);
+    c->complete(r);
   }
 }