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 <axboe@fb.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Martin K. Petersen <martin.petersen@oracle.com>
This commit is contained in:
		
							parent
							
								
									2f9a0b33ac
								
							
						
					
					
						commit
						eb310e23db
					
				| @ -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 | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user