From: Sage Weil Date: Tue, 23 Oct 2012 13:03:09 +0000 (-0700) Subject: osdc/ObjectCacher: take refs for inflight lock ops X-Git-Tag: v0.55~130^2~55^2^2~19 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=21dc0e02625c2b32eab4ad7657c26ea296d0ce7c;p=ceph.git osdc/ObjectCacher: take refs for inflight lock ops These are all dead/unused; should probably just rip out this code! Signed-off-by: Sage Weil --- diff --git a/src/osdc/ObjectCacher.cc b/src/osdc/ObjectCacher.cc index 4cc919cb4f3e..425cda2be6e1 100644 --- a/src/osdc/ObjectCacher.cc +++ b/src/osdc/ObjectCacher.cc @@ -701,7 +701,7 @@ void ObjectCacher::lock_ack(int64_t poolid, list& oids, tid_t tid) } finish_contexts(cct, ls); - + ob->put(); } } @@ -1249,6 +1249,8 @@ void ObjectCacher::rdlock(Object *o) // stake our claim. o->rdlock_ref++; + + o->get(); // wait? if (o->lock_state == Object::LOCK_RDLOCKING || @@ -1295,7 +1297,9 @@ void ObjectCacher::wrlock(Object *o) // stake our claim. o->wrlock_ref++; - + + o->get(); + // wait? if (o->lock_state == Object::LOCK_WRLOCKING || o->lock_state == Object::LOCK_UPGRADING) { @@ -1330,6 +1334,8 @@ void ObjectCacher::rdunlock(Object *o) o->lock_state = Object::LOCK_RDUNLOCKING; + o->get(); + C_LockAck *lockack = new C_LockAck(this, o->oloc.pool, o->get_soid()); C_WriteCommit *commit = new C_WriteCommit(this, o->oloc.pool, o->get_soid(), 0, 0); @@ -1354,6 +1360,8 @@ void ObjectCacher::wrunlock(Object *o) flush(o, 0, 0); // flush first + o->get(); + int op = 0; if (o->rdlock_ref > 0) { ldout(cct, 10) << "wrunlock rdlock " << *o << dendl;