When ->activate isn't present we still need to invoke the
callbacks, otherwise the system might stall.
Signed-off-by: Hannes Reinecke <h...@suse.de>
---
 drivers/scsi/device_handler/scsi_dh.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/scsi/device_handler/scsi_dh.c 
b/drivers/scsi/device_handler/scsi_dh.c
index ae7f399..a90380f 100644
--- a/drivers/scsi/device_handler/scsi_dh.c
+++ b/drivers/scsi/device_handler/scsi_dh.c
@@ -411,7 +411,7 @@ int scsi_dh_activate(struct request_queue *q, 
activate_complete fn, void *data)
                err = SCSI_DH_DEV_OFFLINED;
        spin_unlock_irqrestore(q->queue_lock, flags);
 
-       if (err != SCSI_DH_OK) {
+       if (err != SCSI_DH_OK || !scsi_dh->activate) {
                if (fn)
                        fn(data, err);
                goto out;
-- 
1.7.12.4

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to