diff options
author | Christoph Hellwig <hch@lst.de> | 2020-05-13 14:36:01 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-05-22 16:45:59 +0200 |
commit | c81b49d4d6ca3876fad42fe99e685605294f757c (patch) | |
tree | f89e2f08966e8d975bcce34465bee0ea39acdfad | |
parent | block: remove the error_sector argument to blkdev_issue_flush (diff) | |
download | linux-c81b49d4d6ca3876fad42fe99e685605294f757c.tar.xz linux-c81b49d4d6ca3876fad42fe99e685605294f757c.zip |
block: remove the disk and queue NULL checks in blkdev_issue_flush
Both of these never can be NULL for a live block device.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
-rw-r--r-- | block/blk-flush.c | 8 |
1 files changed, 0 insertions, 8 deletions
diff --git a/block/blk-flush.c b/block/blk-flush.c index d47a579964fb..15ae0155ec07 100644 --- a/block/blk-flush.c +++ b/block/blk-flush.c @@ -438,17 +438,9 @@ void blk_insert_flush(struct request *rq) */ int blkdev_issue_flush(struct block_device *bdev, gfp_t gfp_mask) { - struct request_queue *q; struct bio *bio; int ret = 0; - if (bdev->bd_disk == NULL) - return -ENXIO; - - q = bdev_get_queue(bdev); - if (!q) - return -ENXIO; - bio = bio_alloc(gfp_mask, 0); bio_set_dev(bio, bdev); bio->bi_opf = REQ_OP_WRITE | REQ_PREFLUSH; |