[SCSI] sd: Return correct error code for DIF
authorMartin K. Petersen <martin.petersen@oracle.com>
Tue, 10 Nov 2009 05:39:12 +0000 (00:39 -0500)
committerJames Bottomley <James.Bottomley@suse.de>
Thu, 26 Nov 2009 14:54:46 +0000 (08:54 -0600)
sd_dif.c was not updated to return -EILSEQ, leading to error handling
failures in applications which provide their own integrity metadata (as
opposed to being protected by the block layer functions).

Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: James Bottomley <James.Bottomley@suse.de>
drivers/scsi/sd_dif.c

index 88da977457102e78729781f89a5a8f82f5e2f80a..84be62149c6c92f9de34c1708828398dfba586d9 100644 (file)
@@ -418,7 +418,7 @@ error:
                  __func__, virt, phys, be32_to_cpu(sdt->ref_tag),
                  be16_to_cpu(sdt->app_tag));
 
-       return -EIO;
+       return -EILSEQ;
 }
 
 /*