Target/iser: Wait for proper cleanup before unloading
authorSagi Grimberg <sagig@mellanox.com>
Mon, 19 May 2014 14:44:25 +0000 (17:44 +0300)
committerNicholas Bellinger <nab@linux-iscsi.org>
Tue, 20 May 2014 18:18:43 +0000 (11:18 -0700)
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>
drivers/infiniband/ulp/isert/ib_isert.c

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