mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 19:21:31 -04:00
block: convert blkdev_issue_flush() to use empty barriers
Then we can get rid of ->issue_flush_fn() and all the driver private implementations of that. Signed-off-by: Jens Axboe <[email protected]>
This commit is contained in:
parent
bf2de6f5a4
commit
fd5d806266
16 changed files with 36 additions and 329 deletions
|
|
@ -148,29 +148,6 @@ static int i2o_block_device_flush(struct i2o_device *dev)
|
|||
return i2o_msg_post_wait(dev->iop, msg, 60);
|
||||
};
|
||||
|
||||
/**
|
||||
* i2o_block_issue_flush - device-flush interface for block-layer
|
||||
* @queue: the request queue of the device which should be flushed
|
||||
* @disk: gendisk
|
||||
* @error_sector: error offset
|
||||
*
|
||||
* Helper function to provide flush functionality to block-layer.
|
||||
*
|
||||
* Returns 0 on success or negative error code on failure.
|
||||
*/
|
||||
|
||||
static int i2o_block_issue_flush(struct request_queue * queue, struct gendisk *disk,
|
||||
sector_t * error_sector)
|
||||
{
|
||||
struct i2o_block_device *i2o_blk_dev = queue->queuedata;
|
||||
int rc = -ENODEV;
|
||||
|
||||
if (likely(i2o_blk_dev))
|
||||
rc = i2o_block_device_flush(i2o_blk_dev->i2o_dev);
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
/**
|
||||
* i2o_block_device_mount - Mount (load) the media of device dev
|
||||
* @dev: I2O device which should receive the mount request
|
||||
|
|
@ -1009,7 +986,6 @@ static struct i2o_block_device *i2o_block_device_alloc(void)
|
|||
}
|
||||
|
||||
blk_queue_prep_rq(queue, i2o_block_prep_req_fn);
|
||||
blk_queue_issue_flush_fn(queue, i2o_block_issue_flush);
|
||||
|
||||
gd->major = I2O_MAJOR;
|
||||
gd->queue = queue;
|
||||
|
|
|
|||
Loading…
Reference in a new issue