]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: ImageWatcher should release lock upon request
authorJason Dillaman <dillaman@redhat.com>
Wed, 9 Dec 2015 04:07:52 +0000 (23:07 -0500)
committerJason Dillaman <dillaman@redhat.com>
Tue, 15 Dec 2015 01:31:31 +0000 (20:31 -0500)
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/ImageWatcher.cc
src/librbd/ImageWatcher.h

index 15a7616c9ac2562fb49f5bbf161f851fd2a1b4ac..fc5845aa2333460f83f588567b19d2765fd6e1c1 100644 (file)
@@ -581,9 +581,7 @@ bool ImageWatcher::handle_payload(const RequestLockPayload &payload,
 
     ldout(m_image_ctx.cct, 10) << this << " queuing release of exclusive lock"
                                << dendl;
-    FunctionContext *ctx = new FunctionContext(
-      boost::bind(&ImageWatcher::notify_release_lock, this));
-    m_task_finisher->queue(TASK_CODE_RELEASING_LOCK, ctx);
+    m_image_ctx.exclusive_lock->release_lock(nullptr);
   }
   return true;
 }
index 9fd7c223c570ddb25006cf1a00852aaacd0c00cc..9784227882433b52afe8fec48c748591606eca76 100644 (file)
@@ -46,7 +46,6 @@ public:
   int notify_rename(const std::string &image_name);
 
   void notify_acquired_lock();
-  void notify_release_lock();
   void notify_released_lock();
   void notify_request_lock();
 
@@ -68,7 +67,6 @@ private:
   enum TaskCode {
     TASK_CODE_ACQUIRED_LOCK,
     TASK_CODE_REQUEST_LOCK,
-    TASK_CODE_RELEASING_LOCK,
     TASK_CODE_RELEASED_LOCK,
     TASK_CODE_CANCEL_ASYNC_REQUESTS,
     TASK_CODE_REREGISTER_WATCH,