mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-09-30 22:26:55 +00:00
Revert "blkdev: check for valid request queue before issuing flush"
This reverts commit f10d9f617a
.
We can't have queues without a make_request_fn any more (and the
loop device uses blk-mq these days anyway..).
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
This commit is contained in:
parent
3d745ea5b0
commit
f01b411f41
1 changed files with 0 additions and 9 deletions
|
@ -454,15 +454,6 @@ int blkdev_issue_flush(struct block_device *bdev, gfp_t gfp_mask,
|
||||||
if (!q)
|
if (!q)
|
||||||
return -ENXIO;
|
return -ENXIO;
|
||||||
|
|
||||||
/*
|
|
||||||
* some block devices may not have their queue correctly set up here
|
|
||||||
* (e.g. loop device without a backing file) and so issuing a flush
|
|
||||||
* here will panic. Ensure there is a request function before issuing
|
|
||||||
* the flush.
|
|
||||||
*/
|
|
||||||
if (!q->make_request_fn)
|
|
||||||
return -ENXIO;
|
|
||||||
|
|
||||||
bio = bio_alloc(gfp_mask, 0);
|
bio = bio_alloc(gfp_mask, 0);
|
||||||
bio_set_dev(bio, bdev);
|
bio_set_dev(bio, bdev);
|
||||||
bio->bi_opf = REQ_OP_WRITE | REQ_PREFLUSH;
|
bio->bi_opf = REQ_OP_WRITE | REQ_PREFLUSH;
|
||||||
|
|
Loading…
Reference in a new issue