scsi: read host_busy via scsi_host_busy()
[linux-block.git] / drivers / scsi / hosts.c
index 3771e59a9fae6f324b67747e6ac4c11dc4ede0dc..ea4b0bb0c1cd4e6b12748256741afae339311591 100644 (file)
@@ -563,6 +563,16 @@ struct Scsi_Host *scsi_host_get(struct Scsi_Host *shost)
 }
 EXPORT_SYMBOL(scsi_host_get);
 
+/**
+ * scsi_host_busy - Return the host busy counter
+ * @shost:     Pointer to Scsi_Host to inc.
+ **/
+int scsi_host_busy(struct Scsi_Host *shost)
+{
+       return atomic_read(&shost->host_busy);
+}
+EXPORT_SYMBOL(scsi_host_busy);
+
 /**
  * scsi_host_put - dec a Scsi_Host ref count
  * @shost:     Pointer to Scsi_Host to dec.