]> www.infradead.org Git - users/hch/block.git/commitdiff
block: move blk_steal_bios to blk-mq.c
authorChristoph Hellwig <hch@lst.de>
Thu, 21 Oct 2021 15:37:15 +0000 (17:37 +0200)
committerChristoph Hellwig <hch@lst.de>
Fri, 22 Oct 2021 04:13:33 +0000 (06:13 +0200)
Keep all the request based code together.

Signed-off-by: Christoph Hellwig <hch@lst.de>
block/blk-core.c
block/blk-mq.c

index b3f950df8f69db77ac60ea33bc7352df3b4a6d60..c795d2bdf1cd63336892970e8a1f32e57ceb7050 100644 (file)
@@ -1191,27 +1191,6 @@ void disk_end_io_acct(struct gendisk *disk, unsigned int op,
 }
 EXPORT_SYMBOL(disk_end_io_acct);
 
-/*
- * Steal bios from a request and add them to a bio list.
- * The request must not have been partially completed before.
- */
-void blk_steal_bios(struct bio_list *list, struct request *rq)
-{
-       if (rq->bio) {
-               if (list->tail)
-                       list->tail->bi_next = rq->bio;
-               else
-                       list->head = rq->bio;
-               list->tail = rq->biotail;
-
-               rq->bio = NULL;
-               rq->biotail = NULL;
-       }
-
-       rq->__data_len = 0;
-}
-EXPORT_SYMBOL_GPL(blk_steal_bios);
-
 /**
  * blk_lld_busy - Check if underlying low-level drivers of a device are busy
  * @q : the queue of the device being checked
index 9ffbe511a15f1f221a0214a2ffe8c0f940010ed6..92433b03f9c03f07ba9234fdd5e77d860a3fe090 100644 (file)
@@ -2860,6 +2860,27 @@ free_and_out:
 }
 EXPORT_SYMBOL_GPL(blk_rq_prep_clone);
 
+/*
+ * Steal bios from a request and add them to a bio list.
+ * The request must not have been partially completed before.
+ */
+void blk_steal_bios(struct bio_list *list, struct request *rq)
+{
+       if (rq->bio) {
+               if (list->tail)
+                       list->tail->bi_next = rq->bio;
+               else
+                       list->head = rq->bio;
+               list->tail = rq->biotail;
+
+               rq->bio = NULL;
+               rq->biotail = NULL;
+       }
+
+       rq->__data_len = 0;
+}
+EXPORT_SYMBOL_GPL(blk_steal_bios);
+
 static size_t order_to_size(unsigned int order)
 {
        return (size_t)PAGE_SIZE << order;