Signed-off-by: Jens Axboe <axboe@suse.de>
EXPORT_SYMBOL(blk_rq_unmap_user);
-static int blk_rq_map_kern_endio(struct bio *bio, unsigned int bytes_done,
- int error)
-{
- if (bio->bi_size)
- return 1;
-
- bio_put(bio);
- return 0;
-}
-
/**
* blk_rq_map_kern - map kernel data to a request, for REQ_BLOCK_PC usage
* @q: request queue where request should be inserted
if (!IS_ERR(bio)) {
if (rw)
bio->bi_rw |= (1 << BIO_RW);
- bio->bi_end_io = blk_rq_map_kern_endio;
rq->bio = rq->biotail = bio;
blk_rq_bio_prep(q, rq, bio);
bio_put(bio);
}
+static int bio_map_kern_endio(struct bio *bio, unsigned int bytes_done, int err)
+{
+ if (bio->bi_size)
+ return 1;
+
+ bio_put(bio);
+ return 0;
+}
+
+
static struct bio *__bio_map_kern(request_queue_t *q, void *data,
unsigned int len, unsigned int gfp_mask)
{
offset = 0;
}
+ bio->bi_end_io = bio_map_kern_endio;
return bio;
}