diff --git a/src/v/cloud_topics/level_one/common/file_io.cc b/src/v/cloud_topics/level_one/common/file_io.cc index ba57ed8510dfa..b007006119b53 100644 --- a/src/v/cloud_topics/level_one/common/file_io.cc +++ b/src/v/cloud_topics/level_one/common/file_io.cc @@ -156,10 +156,10 @@ file_io::put_object(object_id oid, staging_file* file, ss::abort_source* as) { ss::future file_io::save_to_cache( ss::input_stream stream, - cloud_io::space_reservation_guard* reservation, + cloud_io::space_reservation_guard reservation, std::filesystem::path cache_key, uint64_t content_length) { - co_await _cache->put(std::move(cache_key), stream, *reservation); + co_await _cache->put(std::move(cache_key), stream, reservation); co_return content_length; } @@ -211,10 +211,13 @@ file_io::read_object(object_extent extent, ss::abort_source* as) { co_return std::unexpected(io::errc::file_io_error); } cloud_io::try_consume_stream consumer = - [this, r = reservation_fut.get(), &cache_key]( + [this, r = reservation_fut.get(), cache_key]( uint64_t content_length, ss::input_stream stream) mutable { return save_to_cache( - std::move(stream), &r, cache_key, content_length); + std::move(stream), + std::move(r), + std::move(cache_key), + content_length); }; auto result_fut = co_await ss::coroutine::as_future( diff --git a/src/v/cloud_topics/level_one/common/file_io.h b/src/v/cloud_topics/level_one/common/file_io.h index 565d84099c6a6..4cc6284955a54 100644 --- a/src/v/cloud_topics/level_one/common/file_io.h +++ b/src/v/cloud_topics/level_one/common/file_io.h @@ -47,7 +47,7 @@ class file_io : public io { private: ss::future save_to_cache( ss::input_stream, - cloud_io::space_reservation_guard*, + cloud_io::space_reservation_guard, std::filesystem::path, uint64_t content_length);