qla2x00t-32gbit, target: Avoid that sqa_qla2xxx_free_session() hangs

Call scst_unregister_session() after having set the completion pointer
instead of before.


git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8183 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2019-04-13 22:44:39 +00:00
parent 96288b9d49
commit e1290dc5dd

View File

@@ -862,11 +862,11 @@ static void sqa_qla2xxx_free_session(struct fc_port *fcport)
wwn_to_str(fcport->port_name));
}
scst_unregister_session(scst_sess, 1, sqa_free_session_done);
{
DECLARE_COMPLETION_ONSTACK(c);
fcport->unreg_done = &c;
scst_unregister_session(scst_sess, 1, sqa_free_session_done);
wait_for_completion(&c);
}