diff options
author | NeilBrown <neilb@suse.de> | 2007-08-16 07:31:27 -0400 |
---|---|---|
committer | Jens Axboe <axboe@carl.home.kernel.dk> | 2007-10-10 03:25:56 -0400 |
commit | 3001ca77128273cc5634d79f5306ce2e5a14ec41 (patch) | |
tree | 0e5904fc170afb6c01f8f0930e3c4a4ae20b19b2 /drivers/scsi/scsi_lib.c | |
parent | eea9befaccb8d43ce89585d612159761c978f056 (diff) |
New function blk_req_append_bio
ll_back_merge_fn is currently exported to SCSI where is it used,
together with blk_rq_bio_prep, in exactly the same way these
functions are used in __blk_rq_map_user.
So move the common code into a new function (blk_rq_append_bio), and
don't export ll_back_merge_fn any longer.
Signed-off-by: Neil Brown <neilb@suse.de>
diff .prev/block/ll_rw_blk.c ./block/ll_rw_blk.c
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
Diffstat (limited to 'drivers/scsi/scsi_lib.c')
-rw-r--r-- | drivers/scsi/scsi_lib.c | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c index a417a6ff9f97..59b398530295 100644 --- a/drivers/scsi/scsi_lib.c +++ b/drivers/scsi/scsi_lib.c | |||
@@ -263,16 +263,7 @@ static int scsi_merge_bio(struct request *rq, struct bio *bio) | |||
263 | bio->bi_rw |= (1 << BIO_RW); | 263 | bio->bi_rw |= (1 << BIO_RW); |
264 | blk_queue_bounce(q, &bio); | 264 | blk_queue_bounce(q, &bio); |
265 | 265 | ||
266 | if (!rq->bio) | 266 | return blk_rq_append_bio(q, rq, bio); |
267 | blk_rq_bio_prep(q, rq, bio); | ||
268 | else if (!ll_back_merge_fn(q, rq, bio)) | ||
269 | return -EINVAL; | ||
270 | else { | ||
271 | rq->biotail->bi_next = bio; | ||
272 | rq->biotail = bio; | ||
273 | } | ||
274 | |||
275 | return 0; | ||
276 | } | 267 | } |
277 | 268 | ||
278 | static int scsi_bi_endio(struct bio *bio, unsigned int bytes_done, int error) | 269 | static int scsi_bi_endio(struct bio *bio, unsigned int bytes_done, int error) |