From: Kefu Chai Date: Sun, 7 Jul 2019 03:12:28 +0000 (+0800) Subject: include/C_Lock: s/Mutex/ceph::mutex/ X-Git-Tag: v15.1.0~1971^2~61 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=33ba265b79a99783e8bbee369b7ee124fd458fe3;p=ceph.git include/C_Lock: s/Mutex/ceph::mutex/ Signed-off-by: Kefu Chai --- diff --git a/src/include/Context.h b/src/include/Context.h index b588b0f1d905..3d85283815a8 100644 --- a/src/include/Context.h +++ b/src/include/Context.h @@ -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(); } } };