aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/ll_rw_blk.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/block/ll_rw_blk.c b/block/ll_rw_blk.c
index 2de9bad1d042..eb27b335d238 100644
--- a/block/ll_rw_blk.c
+++ b/block/ll_rw_blk.c
@@ -43,6 +43,8 @@ static void init_request_from_bio(struct request *req, struct bio *bio);
43static int __make_request(struct request_queue *q, struct bio *bio); 43static int __make_request(struct request_queue *q, struct bio *bio);
44static struct io_context *current_io_context(gfp_t gfp_flags, int node); 44static struct io_context *current_io_context(gfp_t gfp_flags, int node);
45static void blk_recalc_rq_segments(struct request *rq); 45static void blk_recalc_rq_segments(struct request *rq);
46static void blk_rq_bio_prep(struct request_queue *q, struct request *rq,
47 struct bio *bio);
46 48
47/* 49/*
48 * For the allocated request tables 50 * For the allocated request tables
@@ -3665,8 +3667,8 @@ void end_request(struct request *req, int uptodate)
3665 3667
3666EXPORT_SYMBOL(end_request); 3668EXPORT_SYMBOL(end_request);
3667 3669
3668void blk_rq_bio_prep(struct request_queue *q, struct request *rq, 3670static void blk_rq_bio_prep(struct request_queue *q, struct request *rq,
3669 struct bio *bio) 3671 struct bio *bio)
3670{ 3672{
3671 /* first two bits are identical in rq->cmd_flags and bio->bi_rw */ 3673 /* first two bits are identical in rq->cmd_flags and bio->bi_rw */
3672 rq->cmd_flags |= (bio->bi_rw & 3); 3674 rq->cmd_flags |= (bio->bi_rw & 3);
@@ -3680,9 +3682,10 @@ void blk_rq_bio_prep(struct request_queue *q, struct request *rq,
3680 rq->data_len = bio->bi_size; 3682 rq->data_len = bio->bi_size;
3681 3683
3682 rq->bio = rq->biotail = bio; 3684 rq->bio = rq->biotail = bio;
3683}
3684 3685
3685EXPORT_SYMBOL(blk_rq_bio_prep); 3686 if (bio->bi_bdev)
3687 rq->rq_disk = bio->bi_bdev->bd_disk;
3688}
3686 3689
3687int kblockd_schedule_work(struct work_struct *work) 3690int kblockd_schedule_work(struct work_struct *work)
3688{ 3691{