From 8c579ab69d50a416887390ba4b89598a7b2fa0b6 Mon Sep 17 00:00:00 2001 From: "Martin K. Petersen" Date: Tue, 28 Aug 2012 14:29:33 -0400 Subject: [SCSI] sd: Avoid remapping bad reference tags It does not make sense to translate ref tags with unexpected values. Instead we simply ignore them and let the upper layers catch the problem. Ref tags that contain the expected value are still remapped. Signed-off-by: Martin K. Petersen Signed-off-by: James Bottomley --- drivers/scsi/sd.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/scsi/sd.c') diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 4df73e52a4f9..9f7fc39891b8 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -804,9 +804,8 @@ static int sd_prep_fn(struct request_queue *q, struct request *rq) SCpnt->cmnd[0] = WRITE_6; SCpnt->sc_data_direction = DMA_TO_DEVICE; - if (blk_integrity_rq(rq) && - sd_dif_prepare(rq, block, sdp->sector_size) == -EIO) - goto out; + if (blk_integrity_rq(rq)) + sd_dif_prepare(rq, block, sdp->sector_size); } else if (rq_data_dir(rq) == READ) { SCpnt->cmnd[0] = READ_6; -- cgit v1.2.3