]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
sharedptr_registry: remove extaneous Mutex::Locker declaration
authorSamuel Just <sam.just@inktank.com>
Fri, 25 Jan 2013 19:31:29 +0000 (11:31 -0800)
committerSamuel Just <sam.just@inktank.com>
Sat, 26 Jan 2013 01:24:39 +0000 (17:24 -0800)
For some reason, the lookup() retry loop (for when happened to
race with a removal and grab an invalid WeakPtr) locked
the lock again.  This causes the #3836 crash since the lock
is already locked.  It's rare since it requires a lookup between
invalidation of the WeakPtr and removal of the WeakPtr entry.

Fixes: #3836
Backport: bobtail
Signed-off-by: Samuel Just <sam.just@inktank.com>
(cherry picked from commit 037900dc7a051ce2293a4ef9d0e71911b29ec159)

src/common/sharedptr_registry.hpp

index bd0c656024d2f27afc1d3bec44f95d2443f54e64..70e11ba4bff30fc61682988a745aa573ab3b0f7e 100644 (file)
@@ -63,7 +63,6 @@ public:
        break;
       }
       cond.Wait(lock);
-    Mutex::Locker l(lock);
     }
     return VPtr();
   }