From: Jens Axboe Date: Wed, 30 Mar 2016 16:06:11 +0000 (-0600) Subject: sd: switch to using blk_queue_write_cache() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=eb310e23dbafa5f4010df37f35999622af2cf795;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git sd: switch to using blk_queue_write_cache() Switch to the newer interface, instead of using blk_queue_flush() directly. Signed-off-by: Jens Axboe Reviewed-by: Christoph Hellwig Acked-by: Martin K. Petersen --- diff --git a/drivers/scsi/sd.c b/drivers/scsi/sd.c index 69b0a4a7a15f..428c03ef02b2 100644 --- a/drivers/scsi/sd.c +++ b/drivers/scsi/sd.c @@ -137,15 +137,15 @@ static const char *sd_cache_types[] = { static void sd_set_flush_flag(struct scsi_disk *sdkp) { - unsigned flush = 0; + bool wc = false, fua = false; if (sdkp->WCE) { - flush |= REQ_FLUSH; + wc = true; if (sdkp->DPOFUA) - flush |= REQ_FUA; + fua = true; } - blk_queue_flush(sdkp->disk->queue, flush); + blk_queue_write_cache(sdkp->disk->queue, wc, fua); } static ssize_t