Skip to content

Commit 3b005bf

Browse files
Christoph Hellwigaxboe
authored andcommitted
block: move blk_next_bio to bio.c
Keep blk_next_bio next to the core bio infrastructure. Signed-off-by: Christoph Hellwig <[email protected]> Reviewed-by: Chaitanya Kulkarni <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
1 parent 7d8d0c6 commit 3b005bf

File tree

2 files changed

+13
-13
lines changed

2 files changed

+13
-13
lines changed

block/bio.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,19 @@ void bio_chain(struct bio *bio, struct bio *parent)
344344
}
345345
EXPORT_SYMBOL(bio_chain);
346346

347+
struct bio *blk_next_bio(struct bio *bio, unsigned int nr_pages, gfp_t gfp)
348+
{
349+
struct bio *new = bio_alloc(gfp, nr_pages);
350+
351+
if (bio) {
352+
bio_chain(bio, new);
353+
submit_bio(bio);
354+
}
355+
356+
return new;
357+
}
358+
EXPORT_SYMBOL_GPL(blk_next_bio);
359+
347360
static void bio_alloc_rescue(struct work_struct *work)
348361
{
349362
struct bio_set *bs = container_of(work, struct bio_set, rescue_work);

block/blk-lib.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,6 @@
1010

1111
#include "blk.h"
1212

13-
struct bio *blk_next_bio(struct bio *bio, unsigned int nr_pages, gfp_t gfp)
14-
{
15-
struct bio *new = bio_alloc(gfp, nr_pages);
16-
17-
if (bio) {
18-
bio_chain(bio, new);
19-
submit_bio(bio);
20-
}
21-
22-
return new;
23-
}
24-
EXPORT_SYMBOL_GPL(blk_next_bio);
25-
2613
int __blkdev_issue_discard(struct block_device *bdev, sector_t sector,
2714
sector_t nr_sects, gfp_t gfp_mask, int flags,
2815
struct bio **biop)

0 commit comments

Comments
 (0)