osdc/Objecter: linger_register now acquires rwlock

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>
This commit is contained in:
Jason Dillaman 2015-02-05 09:08:46 -05:00
parent b025fbfa22
commit 5b75e30431

View 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;