]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: trim would not complete if exclusive lock is lost 3486/head
authorJason Dillaman <dillaman@redhat.com>
Sat, 24 Jan 2015 07:28:07 +0000 (02:28 -0500)
committerJason Dillaman <dillaman@redhat.com>
Sat, 24 Jan 2015 07:28:07 +0000 (02:28 -0500)
The trim completion context was not properly invoked if the
image's exclusive lock was lost between issuing a librados call
and receiving its completion.

Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/librbd/internal.cc

index db2be22d5a7463b5e46c189ab261a16a23c8aace..23a94b77e24434260afb806d3af9ab74ef58500b 100644 (file)
@@ -1814,7 +1814,7 @@ reprotect_and_return_err:
       RWLock::RLocker l(m_ictx->owner_lock);
       if (m_ictx->image_watcher->is_lock_supported() &&
           !m_ictx->image_watcher->is_lock_owner()) {
-       r = -ERESTART;
+       m_ctx->complete(-ERESTART);
        return;
       }