]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
rgw/cache: fixing the segmentation fault by passing in 'yield'
authorPritha Srivastava <prsrivas@redhat.com>
Wed, 9 Aug 2023 09:47:29 +0000 (15:17 +0530)
committerPritha Srivastava <prsrivas@redhat.com>
Tue, 2 Apr 2024 15:54:50 +0000 (21:24 +0530)
by value to async_completion.

Signed-off-by: Pritha Srivastava <prsrivas@redhat.com>
src/rgw/rgw_ssd_driver.cc

index ba43662097a446cc0d5e067a00cc57e812618dc6..8aa7466e328790bfad33f09bf1e6d3a6e6bc93c6 100644 (file)
@@ -517,7 +517,8 @@ int SSDDriver::delete_attr(const DoutPrefixProvider* dpp, const std::string& key
 void SSDCacheAioRequest::cache_aio_read(const DoutPrefixProvider* dpp, optional_yield y, const std::string& key, off_t ofs, uint64_t len, rgw::Aio* aio, rgw::AioResult& r)
 {
     using namespace boost::asio;
-    async_completion<spawn::yield_context, void()> init(y.get_yield_context());
+    spawn::yield_context yield = y.get_yield_context();
+    async_completion<spawn::yield_context, void()> init(yield);
     auto ex = get_associated_executor(init.completion_handler);
 
     ldpp_dout(dpp, 20) << "SSDCache: " << __func__ << "(): key=" << key << dendl;