]> git.ipfire.org Git - thirdparty/linux.git/blobdiff - block/blk-flush.c
Merge branch 'work.set_fs-exec' of git://git.kernel.org/pub/scm/linux/kernel/git...
[thirdparty/linux.git] / block / blk-flush.c
index 5cc775bdb06acbfac9dbfa79551d97f28c5a97cb..c7f396e3d5e29638c7c94f7b225eac6536550b24 100644 (file)
@@ -160,9 +160,6 @@ static void blk_account_io_flush(struct request *rq)
  *
  * CONTEXT:
  * spin_lock_irq(fq->mq_flush_lock)
- *
- * RETURNS:
- * %true if requests were added to the dispatch queue, %false otherwise.
  */
 static void blk_flush_complete_seq(struct request *rq,
                                   struct blk_flush_queue *fq,
@@ -457,15 +454,6 @@ int blkdev_issue_flush(struct block_device *bdev, gfp_t gfp_mask,
        if (!q)
                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_set_dev(bio, bdev);
        bio->bi_opf = REQ_OP_WRITE | REQ_PREFLUSH;
@@ -485,8 +473,8 @@ int blkdev_issue_flush(struct block_device *bdev, gfp_t gfp_mask,
 }
 EXPORT_SYMBOL(blkdev_issue_flush);
 
-struct blk_flush_queue *blk_alloc_flush_queue(struct request_queue *q,
-               int node, int cmd_size, gfp_t flags)
+struct blk_flush_queue *blk_alloc_flush_queue(int node, int cmd_size,
+                                             gfp_t flags)
 {
        struct blk_flush_queue *fq;
        int rq_sz = sizeof(struct request);