diff options
author | Jens Axboe <axboe@suse.de> | 2005-06-20 08:05:27 -0400 |
---|---|---|
committer | Jens Axboe <axboe@suse.de> | 2005-06-20 08:05:27 -0400 |
commit | b823825e8e09aac6dc1ca362cd5639a87329d636 (patch) | |
tree | f825aa09e088c160d50f2b9e878a287ebf2cb304 /fs/bio.c | |
parent | df46b9a44ceb5af2ea2351ce8e28ae7bd840b00f (diff) |
[PATCH] Keep the bio end_io parts inside of bio.c for blk_rq_map_kern()
Signed-off-by: Jens Axboe <axboe@suse.de>
Diffstat (limited to 'fs/bio.c')
-rw-r--r-- | fs/bio.c | 11 |
1 files changed, 11 insertions, 0 deletions
@@ -701,6 +701,16 @@ void bio_unmap_user(struct bio *bio) | |||
701 | bio_put(bio); | 701 | bio_put(bio); |
702 | } | 702 | } |
703 | 703 | ||
704 | static int bio_map_kern_endio(struct bio *bio, unsigned int bytes_done, int err) | ||
705 | { | ||
706 | if (bio->bi_size) | ||
707 | return 1; | ||
708 | |||
709 | bio_put(bio); | ||
710 | return 0; | ||
711 | } | ||
712 | |||
713 | |||
704 | static struct bio *__bio_map_kern(request_queue_t *q, void *data, | 714 | static struct bio *__bio_map_kern(request_queue_t *q, void *data, |
705 | unsigned int len, unsigned int gfp_mask) | 715 | unsigned int len, unsigned int gfp_mask) |
706 | { | 716 | { |
@@ -734,6 +744,7 @@ static struct bio *__bio_map_kern(request_queue_t *q, void *data, | |||
734 | offset = 0; | 744 | offset = 0; |
735 | } | 745 | } |
736 | 746 | ||
747 | bio->bi_end_io = bio_map_kern_endio; | ||
737 | return bio; | 748 | return bio; |
738 | } | 749 | } |
739 | 750 | ||