libceph: flush msgr queue during mon_client shutdown
authorSage Weil <sage@inktank.com>
Mon, 11 Jun 2012 03:43:56 +0000 (20:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 26 Nov 2012 19:38:09 +0000 (11:38 -0800)
commit21cbad59b07693104dda76ee4afef41302b2b8fb
treeabc235870afd39ee9a90ec98d923ad2d07c678a9
parent576e428b246271f0f078079c68a9f11679c7db8a
libceph: flush msgr queue during mon_client shutdown

(cherry picked from commit f3dea7edd3d449fe7a6d402c1ce56a294b985261)
(cherry picked from commit 642c0dbde32f34baa7886e988a067089992adc8f)

We need to flush the msgr workqueue during mon_client shutdown to
ensure that any work affecting our embedded ceph_connection is
finished so that we can be safely destroyed.

Previously, we were flushing the work queue after osd_client
shutdown and before mon_client shutdown to ensure that any osd
connection refs to authorizers are flushed.  Remove the redundant
flush, and document in the comment that the mon_client flush is
needed to cover that case as well.

Signed-off-by: Sage Weil <sage@inktank.com>
Reviewed-by: Alex Elder <elder@inktank.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
net/ceph/ceph_common.c
net/ceph/mon_client.c