]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
src/rgw/rgw_file.cc: fix lock_guard usage
authorDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 26 Apr 2018 20:13:33 +0000 (22:13 +0200)
committerDanny Al-Gaaf <danny.al-gaaf@bisect.de>
Thu, 26 Apr 2018 20:13:33 +0000 (22:13 +0200)
Fix for:

[src/rgw/rgw_file.cc:255]: (style) Instance of 'lock_guard' object
 is destroyed immediately.

Signed-off-by: Danny Al-Gaaf <danny.al-gaaf@bisect.de>
src/rgw/rgw_file.cc

index 2e09d4a8f807135bfc9e435b6413ab31168559ac..c7795b4a187a48fe633569091f8ef93239bad651 100644 (file)
@@ -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;
     }