diff options
author | Christoph Hellwig <hch@lst.de> | 2020-03-24 08:25:12 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-03-24 07:57:07 -0600 |
commit | 5cbd28e3cef14b43b2a8271d36b75fc61c13bb8a (patch) | |
tree | 3c2243343e2631c9129f3f663c450de6f92b00ca /block/bio.c | |
parent | ea3edd4dc23027083fbb4a73b65114d08fe73a76 (diff) |
block: move disk_name and related helpers out of partition-generic.c
Thes functions aren't really related to partition support, so move them
to a more suitable place.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/bio.c')
-rw-r--r-- | block/bio.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/block/bio.c b/block/bio.c index 0985f3422556..209715765a7a 100644 --- a/block/bio.c +++ b/block/bio.c @@ -680,6 +680,12 @@ struct bio *bio_clone_fast(struct bio *bio, gfp_t gfp_mask, struct bio_set *bs) } EXPORT_SYMBOL(bio_clone_fast); +const char *bio_devname(struct bio *bio, char *buf) +{ + return disk_name(bio->bi_disk, bio->bi_partno, buf); +} +EXPORT_SYMBOL(bio_devname); + static inline bool page_is_mergeable(const struct bio_vec *bv, struct page *page, unsigned int len, unsigned int off, bool *same_page) |