]> git.baikalelectronics.ru Git - kernel.git/commitdiff
block: move blk_next_bio to bio.c
authorChristoph Hellwig <hch@lst.de>
Mon, 24 Jan 2022 09:11:01 +0000 (10:11 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 2 Feb 2022 14:49:59 +0000 (07:49 -0700)
Keep blk_next_bio next to the core bio infrastructure.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20220124091107.642561-14-hch@lst.de
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c
block/blk-lib.c

index 4312a8085396b6d232b2dfa13c6487bd9eb3db04..1536579ed490a8665cbf7ef83a50a70cbc2e919a 100644 (file)
@@ -344,6 +344,19 @@ void bio_chain(struct bio *bio, struct bio *parent)
 }
 EXPORT_SYMBOL(bio_chain);
 
+struct bio *blk_next_bio(struct bio *bio, unsigned int nr_pages, gfp_t gfp)
+{
+       struct bio *new = bio_alloc(gfp, nr_pages);
+
+       if (bio) {
+               bio_chain(bio, new);
+               submit_bio(bio);
+       }
+
+       return new;
+}
+EXPORT_SYMBOL_GPL(blk_next_bio);
+
 static void bio_alloc_rescue(struct work_struct *work)
 {
        struct bio_set *bs = container_of(work, struct bio_set, rescue_work);
index 9f09beadcbe30a47588773027d785555101ffd7e..9245b300ef73eaa50ba962d614c03cc480bb939d 100644 (file)
 
 #include "blk.h"
 
-struct bio *blk_next_bio(struct bio *bio, unsigned int nr_pages, gfp_t gfp)
-{
-       struct bio *new = bio_alloc(gfp, nr_pages);
-
-       if (bio) {
-               bio_chain(bio, new);
-               submit_bio(bio);
-       }
-
-       return new;
-}
-EXPORT_SYMBOL_GPL(blk_next_bio);
-
 int __blkdev_issue_discard(struct block_device *bdev, sector_t sector,
                sector_t nr_sects, gfp_t gfp_mask, int flags,
                struct bio **biop)