]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
osdc/Objecter: linger_register now acquires rwlock 3680/head
authorJason Dillaman <dillaman@redhat.com>
Thu, 5 Feb 2015 14:08:46 +0000 (09:08 -0500)
committerJason Dillaman <dillaman@redhat.com>
Thu, 5 Feb 2015 14:08:46 +0000 (09:08 -0500)
Previously linger_register just created a RWLock::Context
which does not result in the lock being acquired.

Fixes: #10827
Signed-off-by: Jason Dillaman <dillaman@redhat.com>
src/osdc/Objecter.cc

index 20f89767226bf437c6ba360663d637603388cdbc..8ce7f8777ac7c0189ee3d22cf696adb771c9f68a 100644 (file)
@@ -658,7 +658,7 @@ Objecter::LingerOp *Objecter::linger_register(const object_t& oid,
   info->target.flags = flags;
   info->watch_valid_thru = ceph_clock_now(NULL);
 
-  RWLock::Context lc(rwlock, RWLock::Context::TakenForWrite);
+  RWLock::WLocker l(rwlock);
 
   // Acquire linger ID
   info->linger_id = ++max_linger_id;