Browse Source

Target/iser: Wait for proper cleanup before unloading

disconnected_handler works are scheduled on system_wq.
When attempting to unload, first make sure all works
have cleaned up.

Signed-off-by: Sagi Grimberg <sagig@mellanox.com>
Cc: stable@vger.kernel.org # 3.10+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Sagi Grimberg 11 years ago
parent
commit
f5ebec9629
1 changed files with 1 additions and 0 deletions
  1. 1 0
      drivers/infiniband/ulp/isert/ib_isert.c

+ 1 - 0
drivers/infiniband/ulp/isert/ib_isert.c

@@ -3287,6 +3287,7 @@ destroy_rx_wq:
 
 
 static void __exit isert_exit(void)
 static void __exit isert_exit(void)
 {
 {
+	flush_scheduled_work();
 	destroy_workqueue(isert_comp_wq);
 	destroy_workqueue(isert_comp_wq);
 	destroy_workqueue(isert_rx_wq);
 	destroy_workqueue(isert_rx_wq);
 	iscsit_unregister_transport(&iser_target_transport);
 	iscsit_unregister_transport(&iser_target_transport);