X-Git-Url: http://git.samba.org/samba.git/?a=blobdiff_plain;f=drivers%2Fscsi%2Fscsi_lib.c;h=07dfc17d48246551a63966444172b4197e30def4;hb=8f76216c80c299ab8074b8658b73faa3815c6f39;hp=601b9f1de26758a1d078a69de36469ad4318d39d;hpb=4b609f1e26f36c43e2dcdebe81e1d612705920d4;p=sfrench%2Fcifs-2.6.git diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index 601b9f1de267..07dfc17d4824 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c @@ -1706,8 +1706,12 @@ out_put_budget: ret = BLK_STS_DEV_RESOURCE; break; default: + if (unlikely(!scsi_device_online(sdev))) + scsi_req(req)->result = DID_NO_CONNECT << 16; + else + scsi_req(req)->result = DID_ERROR << 16; /* - * Make sure to release all allocated ressources when + * Make sure to release all allocated resources when * we hit an error, as we will never see this command * again. */