diff --git a/db/hints/manager.hh b/db/hints/manager.hh index 47b1b626cc..7e1a3e8a5d 100644 --- a/db/hints/manager.hh +++ b/db/hints/manager.hh @@ -391,8 +391,7 @@ public: /// \return Whatever \ref func returns. template friend inline auto with_file_update_mutex(end_point_hints_manager& ep_man, Func&& func) { - lw_shared_ptr lock_ptr = ep_man._file_update_mutex_ptr; - return with_lock(*lock_ptr, std::forward(func)).finally([lock_ptr] {}); + return with_lock(*ep_man._file_update_mutex_ptr, std::forward(func)).finally([lock_ptr = ep_man._file_update_mutex_ptr] {}); } const fs::path& hints_dir() const noexcept {