]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: add ManagedLock destroy method (useful for mock tests)
authorMykola Golub <mgolub@mirantis.com>
Sat, 18 Feb 2017 09:29:13 +0000 (10:29 +0100)
committerMykola Golub <mgolub@mirantis.com>
Thu, 23 Feb 2017 11:57:19 +0000 (12:57 +0100)
Signed-off-by: Mykola Golub <mgolub@mirantis.com>
src/librbd/ManagedLock.h

index a4071086d64d60ade11e5b4f509911ef53ccf111..1684e71a9d9e50ced666812a88d8ae26c95e058f 100644 (file)
@@ -39,6 +39,9 @@ public:
     return new ManagedLock(ioctx, work_queue, oid, watcher, mode,
                            blacklist_on_break_lock, blacklist_expire_seconds);
   }
+  void destroy() {
+    delete this;
+  }
 
   ManagedLock(librados::IoCtx& ioctx, ContextWQ *work_queue,
               const std::string& oid, Watcher *watcher,