sd: Fix missing ATO tag check
authorMartin K. Petersen <martin.petersen@oracle.com>
Tue, 14 Apr 2015 21:11:03 +0000 (17:11 -0400)
committerJames Bottomley <JBottomley@Odin.com>
Thu, 16 Apr 2015 17:37:12 +0000 (10:37 -0700)
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+
Reviewed-by: Sagi Grimberg <sagig@mellanox.com>
Signed-off-by: James Bottomley <JBottomley@Odin.com>
drivers/scsi/sd_dif.c

index 14c7d42a11c2af506078d6bdbe1de03d3eee92dd..5c06d292b94c704a5dd96f8549aa732baf8b69c9 100644 (file)
@@ -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)