From 22cc1fd89c00c973bd92e5dbcc0201fc137279e9 Mon Sep 17 00:00:00 2001 From: Danny Al-Gaaf Date: Thu, 26 Apr 2018 22:13:33 +0200 Subject: [PATCH] src/rgw/rgw_file.cc: fix lock_guard usage Fix for: [src/rgw/rgw_file.cc:255]: (style) Instance of 'lock_guard' object is destroyed immediately. Signed-off-by: Danny Al-Gaaf --- src/rgw/rgw_file.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/rgw/rgw_file.cc b/src/rgw/rgw_file.cc index 2e09d4a8f80..c7795b4a187 100644 --- a/src/rgw/rgw_file.cc +++ b/src/rgw/rgw_file.cc @@ -252,7 +252,7 @@ namespace rgw { int rc = rgwlib.get_fe()->execute_req(&req); if ((rc == 0) && (req.get_ret() == 0)) { - lock_guard(rgw_fh->mtx); + lock_guard guard(rgw_fh->mtx); rgw_fh->set_atime(real_clock::to_timespec(real_clock::now())); *bytes_read = req.nread; } -- 2.39.5