]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: invalidating the cache shouldn't hold write lock 19066/head
authorJason Dillaman <dillaman@redhat.com>
Wed, 15 Nov 2017 15:35:16 +0000 (10:35 -0500)
committerPrashant D <pdhange@redhat.com>
Tue, 21 Nov 2017 03:38:26 +0000 (22:38 -0500)
This can cause deadlock when readahead is in-progress since neither
can make forward progress.

Fixes: http://tracker.ceph.com/issues/22131
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
(cherry picked from commit 6a335481d20c6a765c84d561a01fb52172eccba4)

src/librbd/internal.cc

index acbe336629ccd4c52aee6ed94e4e06a533865b30..d2695f57416007eff4c56341f8180d7cd9d81c67 100644 (file)
@@ -2244,7 +2244,6 @@ int validate_pool(IoCtx &io_ctx, CephContext *cct) {
     }
 
     RWLock::RLocker owner_locker(ictx->owner_lock);
-    RWLock::WLocker md_locker(ictx->md_lock);
     r = ictx->invalidate_cache(false);
     ictx->perfcounter->inc(l_librbd_invalidate_cache);
     return r;