ceph/ceph — pull request #1356 by dzafman (2014-03-03 20:31:53+00:00)
Title: osd: stray pg ref on shutdown

Move agent_clear() from only being done when becoming replica
Do it in clear_primary_state() whenever we stop being primary
clear_primary_state() passed whether we are staying a primary
Add asserts in agent_stop() and don't need to clear agent_queue

Fixes: #7458

Signed-off-by: David Zafman