Commit 3b005bf6 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe

block: move blk_next_bio to bio.c

Keep blk_next_bio next to the core bio infrastructure.
Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarChaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20220124091107.642561-14-hch@lst.deSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent 7d8d0c65
...@@ -344,6 +344,19 @@ void bio_chain(struct bio *bio, struct bio *parent) ...@@ -344,6 +344,19 @@ void bio_chain(struct bio *bio, struct bio *parent)
} }
EXPORT_SYMBOL(bio_chain); 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) static void bio_alloc_rescue(struct work_struct *work)
{ {
struct bio_set *bs = container_of(work, struct bio_set, rescue_work); struct bio_set *bs = container_of(work, struct bio_set, rescue_work);
......
...@@ -10,19 +10,6 @@ ...@@ -10,19 +10,6 @@
#include "blk.h" #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, int __blkdev_issue_discard(struct block_device *bdev, sector_t sector,
sector_t nr_sects, gfp_t gfp_mask, int flags, sector_t nr_sects, gfp_t gfp_mask, int flags,
struct bio **biop) struct bio **biop)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment