librbd: add ManagedLock destroy method (useful for mock tests)

Signed-off-by: Mykola Golub <mgolub@mirantis.com>
This commit is contained in:
Mykola Golub 2017-02-18 10:29:13 +01:00
parent c9afb1d459
commit 385c2e4d11

View 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,