From: Danny Al-Gaaf Date: Thu, 26 Apr 2018 20:13:33 +0000 (+0200) Subject: src/rgw/rgw_file.cc: fix lock_guard usage X-Git-Tag: v13.1.0~44^2~4 X-Git-Url: http://git.apps.os.sepia.ceph.com/?a=commitdiff_plain;h=22cc1fd89c00c973bd92e5dbcc0201fc137279e9;p=ceph-ci.git 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 --- 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; }