diff mbox

sd: Fix missing ATO tag check

Message ID 1429045863-4300-1-git-send-email-martin.petersen@oracle.com (mailing list archive)
State New, archived
Headers show

Commit Message

Martin K. Petersen April 14, 2015, 9:11 p.m. UTC
3aec2f41a8bae introduced a merge error where we would end up check for
sdkp instead of sdkp->ATO. Fix this so we register app tag capability
correctly.

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Cc: <stable@vger.kernel.org> # v3.17+
---
 drivers/scsi/sd_dif.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Sagi Grimberg April 15, 2015, 9:25 a.m. UTC | #1
On 4/15/2015 12:11 AM, Martin K. Petersen wrote:
> 3aec2f41a8bae introduced a merge error where we would end up check for
> sdkp instead of sdkp->ATO. Fix this so we register app tag capability
> correctly.
>
> Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
> Cc: <stable@vger.kernel.org> # v3.17+
> ---
>   drivers/scsi/sd_dif.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/scsi/sd_dif.c b/drivers/scsi/sd_dif.c
> index 14c7d42a11c2..5c06d292b94c 100644
> --- a/drivers/scsi/sd_dif.c
> +++ b/drivers/scsi/sd_dif.c
> @@ -77,7 +77,7 @@ void sd_dif_config_host(struct scsi_disk *sdkp)
>
>   		disk->integrity->flags |= BLK_INTEGRITY_DEVICE_CAPABLE;
>
> -		if (!sdkp)
> +		if (!sdkp->ATO)
>   			return;
>
>   		if (type == SD_DIF_TYPE3_PROTECTION)
>

Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/drivers/scsi/sd_dif.c b/drivers/scsi/sd_dif.c
index 14c7d42a11c2..5c06d292b94c 100644
--- a/drivers/scsi/sd_dif.c
+++ b/drivers/scsi/sd_dif.c
@@ -77,7 +77,7 @@  void sd_dif_config_host(struct scsi_disk *sdkp)
 
 		disk->integrity->flags |= BLK_INTEGRITY_DEVICE_CAPABLE;
 
-		if (!sdkp)
+		if (!sdkp->ATO)
 			return;
 
 		if (type == SD_DIF_TYPE3_PROTECTION)