bsg: provide bsg_remove_queue() helper
All drivers do unregister + cleanup, provide a helper for that. Cc: linux-scsi@vger.kernel.org Reviewed-by: Hannes Reinecke <hare@suse.com> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Reviewed-by: Christoph Hellwig <hch@lst.de> Tested-by: Benjamin Block <bblock@linux.vnet.ibm.com> Tested-by: Ming Lei <ming.lei@redhat.com> Reviewed-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
@@ -1576,10 +1576,7 @@ static int iscsi_remove_host(struct transport_container *tc,
|
||||
struct Scsi_Host *shost = dev_to_shost(dev);
|
||||
struct iscsi_cls_host *ihost = shost->shost_data;
|
||||
|
||||
if (ihost->bsg_q) {
|
||||
bsg_unregister_queue(ihost->bsg_q);
|
||||
blk_cleanup_queue(ihost->bsg_q);
|
||||
}
|
||||
bsg_remove_queue(ihost->bsg_q);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user