summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTejun Heo <htejun@gmail.com>2007-03-20 16:07:18 +0100
committerJames Bottomley <jejb@mulgrave.il.steeleye.com>2007-03-20 17:33:32 +0100
commit3721050afc6cb6ddf6de0f782e2054ebcc225e9b (patch)
tree107f2b72a66674dc8769689335a248954bc8b8f5
parent[SCSI] fusion: remove VMWare guest OS remounted as read only work around (diff)
downloadlinux-3721050afc6cb6ddf6de0f782e2054ebcc225e9b.tar.xz
linux-3721050afc6cb6ddf6de0f782e2054ebcc225e9b.zip
[SCSI] sd: fix return value of sd_sync_cache()
sd_sync_cache() should return -errno on error, fix it. Signed-off-by: Tejun Heo <htejun@gmail.com> Signed-off-by: James Bottomley <James.Bottomley@SteelEye.com>
-rw-r--r--drivers/scsi/sd.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index 12e18bb5456a..3dda77c31f50 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -766,7 +766,9 @@ static int sd_sync_cache(struct scsi_disk *sdkp)
sd_print_sense_hdr(sdkp, &sshdr);
}
- return res;
+ if (res)
+ return -EIO;
+ return 0;
}
static int sd_issue_flush(struct device *dev, sector_t *error_sector)