From: Jason Dillaman Date: Sat, 24 Jan 2015 07:28:07 +0000 (-0500) Subject: librbd: trim would not complete if exclusive lock is lost X-Git-Tag: v0.93~190^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=dc1630e9f2b8478eec2aa7f8b2c9d721932a6ddb;p=ceph.git librbd: trim would not complete if exclusive lock is lost 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 --- diff --git a/src/librbd/internal.cc b/src/librbd/internal.cc index db2be22d5a74..23a94b77e244 100644 --- a/src/librbd/internal.cc +++ b/src/librbd/internal.cc @@ -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; }