ceph: remove bad calls to ceph_con_shutdown

We want to ceph_con_close when we're done with the connection, before
the ref count reaches 0.  Once it does, do not call ceph_con_shutdown,
as that takes the con mutex and may sleep, and besides that is
unnecessary.

Signed-off-by: Sage Weil <sage@newdream.net>
This commit is contained in:
Sage Weil
2009-11-18 11:22:36 -08:00
parent 11ea8eda06
commit 42ce56e50d
3 changed files with 19 additions and 16 deletions

View File

@@ -350,10 +350,8 @@ static void put_osd(struct ceph_osd *osd)
{
dout("put_osd %p %d -> %d\n", osd, atomic_read(&osd->o_ref),
atomic_read(&osd->o_ref) - 1);
if (atomic_dec_and_test(&osd->o_ref)) {
ceph_con_shutdown(&osd->o_con);
if (atomic_dec_and_test(&osd->o_ref))
kfree(osd);
}
}
/*