]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
librbd: invalidating the cache shouldn't hold write lock 18947/head
authorJason Dillaman <dillaman@redhat.com>
Wed, 15 Nov 2017 15:35:16 +0000 (10:35 -0500)
committerJason Dillaman <dillaman@redhat.com>
Wed, 15 Nov 2017 15:35:16 +0000 (10:35 -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>
src/librbd/internal.cc

index f583d9632a84a1c013351c2175a0826c8cbbf606..f3a1a933eeb8a6ac01298abca7b31bd8f7364c3e 100644 (file)
@@ -2248,7 +2248,6 @@ bool compare_by_name(const child_info_t& c1, const child_info_t& c2)
     }
 
     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;