summaryrefslogtreecommitdiff
path: root/fs/bio.c
diff options
context:
space:
mode:
authorJens Axboe <axboe@suse.de>2005-06-20 14:05:27 +0200
committerJens Axboe <axboe@suse.de>2005-06-20 14:05:27 +0200
commitb823825e8e09aac6dc1ca362cd5639a87329d636 (patch)
treef825aa09e088c160d50f2b9e878a287ebf2cb304 /fs/bio.c
parentdf46b9a44ceb5af2ea2351ce8e28ae7bd840b00f (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.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/fs/bio.c b/fs/bio.c
index 707b9af2dd01..c0d9140e470c 100644
--- a/fs/bio.c
+++ b/fs/bio.c
@@ -701,6 +701,16 @@ void bio_unmap_user(struct bio *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)
{
@@ -734,6 +744,7 @@ static struct bio *__bio_map_kern(request_queue_t *q, void *data,
offset = 0;
}
+ bio->bi_end_io = bio_map_kern_endio;
return bio;
}