aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/scsi/sd.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/scsi/sd.c')
-rw-r--r--drivers/scsi/sd.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c
index cdfc51ab9cf2..63bd01ae534f 100644
--- a/drivers/scsi/sd.c
+++ b/drivers/scsi/sd.c
@@ -2109,7 +2109,7 @@ static int sd_revalidate_disk(struct gendisk *disk)
2109 struct scsi_disk *sdkp = scsi_disk(disk); 2109 struct scsi_disk *sdkp = scsi_disk(disk);
2110 struct scsi_device *sdp = sdkp->device; 2110 struct scsi_device *sdp = sdkp->device;
2111 unsigned char *buffer; 2111 unsigned char *buffer;
2112 unsigned ordered; 2112 unsigned flush = 0;
2113 2113
2114 SCSI_LOG_HLQUEUE(3, sd_printk(KERN_INFO, sdkp, 2114 SCSI_LOG_HLQUEUE(3, sd_printk(KERN_INFO, sdkp,
2115 "sd_revalidate_disk\n")); 2115 "sd_revalidate_disk\n"));
@@ -2151,15 +2151,15 @@ static int sd_revalidate_disk(struct gendisk *disk)
2151 2151
2152 /* 2152 /*
2153 * We now have all cache related info, determine how we deal 2153 * We now have all cache related info, determine how we deal
2154 * with ordered requests. 2154 * with flush requests.
2155 */ 2155 */
2156 if (sdkp->WCE) 2156 if (sdkp->WCE) {
2157 ordered = sdkp->DPOFUA 2157 flush |= REQ_FLUSH;
2158 ? QUEUE_ORDERED_DRAIN_FUA : QUEUE_ORDERED_DRAIN_FLUSH; 2158 if (sdkp->DPOFUA)
2159 else 2159 flush |= REQ_FUA;
2160 ordered = QUEUE_ORDERED_DRAIN; 2160 }
2161 2161
2162 blk_queue_ordered(sdkp->disk->queue, ordered); 2162 blk_queue_flush(sdkp->disk->queue, flush);
2163 2163
2164 set_capacity(disk, sdkp->capacity); 2164 set_capacity(disk, sdkp->capacity);
2165 kfree(buffer); 2165 kfree(buffer);