]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
include/C_Lock: s/Mutex/ceph::mutex/
authorKefu Chai <kchai@redhat.com>
Sun, 7 Jul 2019 03:12:28 +0000 (11:12 +0800)
committerKefu Chai <kchai@redhat.com>
Sat, 3 Aug 2019 01:34:50 +0000 (09:34 +0800)
Signed-off-by: Kefu Chai <kchai@redhat.com>
src/include/Context.h

index b588b0f1d905b9778196621731a1d0a37f0d5d46..3d85283815a8673b139a9b60fd48ec295a82e300 100644 (file)
@@ -175,18 +175,17 @@ public:
 
 
 struct C_Lock : public Context {
-  Mutex *lock;
+  ceph::mutex *lock;
   Context *fin;
-  C_Lock(Mutex *l, Context *c) : lock(l), fin(c) {}
+  C_Lock(ceph::mutex *l, Context *c) : lock(l), fin(c) {}
   ~C_Lock() override {
     delete fin;
   }
   void finish(int r) override {
     if (fin) {
-      lock->Lock();
+      std::lock_guard l{*lock};
       fin->complete(r);
       fin = NULL;
-      lock->Unlock();
     }
   }
 };