Merge tag 'gfs2-4.7.fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/gfs2...
[cascardo/linux.git] / drivers / scsi / sd.c
index 69b0a4a..428c03e 100644 (file)
@@ -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