[SCSI] export scsi-ml functions needed by tgt_scsi_lib and its LLDs
[firefly-linux-kernel-4.4.55.git] / drivers / scsi / hosts.c
index 2ffdc9e0532ddbc8aae4a87cd039dfb3b4c495c5..38c3a291efacd532cfdba99d7e7c291fc8de0395 100644 (file)
@@ -263,6 +263,10 @@ static void scsi_host_dev_release(struct device *dev)
                kthread_stop(shost->ehandler);
        if (shost->work_q)
                destroy_workqueue(shost->work_q);
+       if (shost->uspace_req_q) {
+               kfree(shost->uspace_req_q->queuedata);
+               scsi_free_queue(shost->uspace_req_q);
+       }
 
        scsi_destroy_command_freelist(shost);
        if (shost->bqt)