tree f825aa09e088c160d50f2b9e878a287ebf2cb304
parent df46b9a44ceb5af2ea2351ce8e28ae7bd840b00f
author Jens Axboe <[EMAIL PROTECTED]> Mon, 20 Jun 2005 14:05:27 +0200
committer Jens Axboe <[EMAIL PROTECTED]> Mon, 20 Jun 2005 14:05:27 +0200

[PATCH] Keep the bio end_io parts inside of bio.c for blk_rq_map_kern()

Signed-off-by: Jens Axboe <[EMAIL PROTECTED]>

 drivers/block/ll_rw_blk.c |   11 -----------
 fs/bio.c                  |   11 +++++++++++
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/drivers/block/ll_rw_blk.c b/drivers/block/ll_rw_blk.c
--- a/drivers/block/ll_rw_blk.c
+++ b/drivers/block/ll_rw_blk.c
@@ -2177,16 +2177,6 @@ int blk_rq_unmap_user(struct request *rq
 
 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
@@ -2213,7 +2203,6 @@ struct request *blk_rq_map_kern(request_
        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);
diff --git a/fs/bio.c b/fs/bio.c
--- 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(reques
                offset = 0;
        }
 
+       bio->bi_end_io = bio_map_kern_endio;
        return bio;
 }
 
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to