diff options
Diffstat (limited to 'include/linux/bio.h')
-rw-r--r-- | include/linux/bio.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/linux/bio.h b/include/linux/bio.h index 21825c74..6528fe19 100644 --- a/include/linux/bio.h +++ b/include/linux/bio.h @@ -239,6 +239,12 @@ struct bio *bio_alloc_bioset(struct block_device *, unsigned, extern void bio_put(struct bio *); int bio_add_page(struct bio *, struct page *, unsigned, unsigned); +void bio_add_virt_nofail(struct bio *, void *, unsigned); + +static inline void bio_add_vmalloc(struct bio *bio, void *vaddr, unsigned len) +{ + bio_add_virt_nofail(bio, vaddr, len); +} struct bio *bio_alloc_clone(struct block_device *, struct bio *, gfp_t, struct bio_set *); @@ -278,7 +284,7 @@ do { \ (dst)->bi_bdev = (src)->bi_bdev; \ } while (0) -static inline char *bvec_kmap_irq(struct bio_vec *bvec, unsigned long *flags) +static inline void *bvec_kmap_irq(struct bio_vec *bvec, unsigned long *flags) { return page_address(bvec->bv_page) + bvec->bv_offset; } @@ -288,14 +294,14 @@ static inline void bvec_kunmap_irq(char *buffer, unsigned long *flags) *flags = 0; } -static inline char *bvec_kmap_local(struct bio_vec *bvec) +static inline void *bvec_kmap_local(struct bio_vec *bvec) { return page_address(bvec->bv_page) + bvec->bv_offset; } static inline void bvec_kunmap_local(char *buffer) {} -static inline char *__bio_kmap_irq(struct bio *bio, struct bvec_iter iter, +static inline void *__bio_kmap_irq(struct bio *bio, struct bvec_iter iter, unsigned long *flags) { return bvec_kmap_irq(&bio_iter_iovec(bio, iter), flags); |