aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
Diffstat (limited to 'block')
-rw-r--r--block/blk-barrier.c4
-rw-r--r--block/blk-core.c5
-rw-r--r--block/blk.h1
3 files changed, 5 insertions, 5 deletions
diff --git a/block/blk-barrier.c b/block/blk-barrier.c
index 47127ba09e45..66e55288178c 100644
--- a/block/blk-barrier.c
+++ b/block/blk-barrier.c
@@ -143,7 +143,7 @@ static void queue_flush(struct request_queue *q, unsigned which)
143 end_io = post_flush_end_io; 143 end_io = post_flush_end_io;
144 } 144 }
145 145
146 rq_init(q, rq); 146 blk_rq_init(q, rq);
147 rq->cmd_flags = REQ_HARDBARRIER; 147 rq->cmd_flags = REQ_HARDBARRIER;
148 rq->rq_disk = q->bar_rq.rq_disk; 148 rq->rq_disk = q->bar_rq.rq_disk;
149 rq->end_io = end_io; 149 rq->end_io = end_io;
@@ -165,7 +165,7 @@ static inline struct request *start_ordered(struct request_queue *q,
165 blkdev_dequeue_request(rq); 165 blkdev_dequeue_request(rq);
166 q->orig_bar_rq = rq; 166 q->orig_bar_rq = rq;
167 rq = &q->bar_rq; 167 rq = &q->bar_rq;
168 rq_init(q, rq); 168 blk_rq_init(q, rq);
169 if (bio_data_dir(q->orig_bar_rq->bio) == WRITE) 169 if (bio_data_dir(q->orig_bar_rq->bio) == WRITE)
170 rq->cmd_flags |= REQ_RW; 170 rq->cmd_flags |= REQ_RW;
171 if (q->ordered & QUEUE_ORDERED_FUA) 171 if (q->ordered & QUEUE_ORDERED_FUA)
diff --git a/block/blk-core.c b/block/blk-core.c
index d2f23ec5ebfa..fe0d1390b743 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -107,7 +107,7 @@ struct backing_dev_info *blk_get_backing_dev_info(struct block_device *bdev)
107} 107}
108EXPORT_SYMBOL(blk_get_backing_dev_info); 108EXPORT_SYMBOL(blk_get_backing_dev_info);
109 109
110void rq_init(struct request_queue *q, struct request *rq) 110void blk_rq_init(struct request_queue *q, struct request *rq)
111{ 111{
112 memset(rq, 0, sizeof(*rq)); 112 memset(rq, 0, sizeof(*rq));
113 113
@@ -120,6 +120,7 @@ void rq_init(struct request_queue *q, struct request *rq)
120 rq->tag = -1; 120 rq->tag = -1;
121 rq->ref_count = 1; 121 rq->ref_count = 1;
122} 122}
123EXPORT_SYMBOL(blk_rq_init);
123 124
124static void req_bio_endio(struct request *rq, struct bio *bio, 125static void req_bio_endio(struct request *rq, struct bio *bio,
125 unsigned int nbytes, int error) 126 unsigned int nbytes, int error)
@@ -598,7 +599,7 @@ blk_alloc_request(struct request_queue *q, int rw, int priv, gfp_t gfp_mask)
598 if (!rq) 599 if (!rq)
599 return NULL; 600 return NULL;
600 601
601 rq_init(q, rq); 602 blk_rq_init(q, rq);
602 603
603 /* 604 /*
604 * first three bits are identical in rq->cmd_flags and bio->bi_rw, 605 * first three bits are identical in rq->cmd_flags and bio->bi_rw,
diff --git a/block/blk.h b/block/blk.h
index ec9120fb789a..59776ab4742a 100644
--- a/block/blk.h
+++ b/block/blk.h
@@ -10,7 +10,6 @@
10extern struct kmem_cache *blk_requestq_cachep; 10extern struct kmem_cache *blk_requestq_cachep;
11extern struct kobj_type blk_queue_ktype; 11extern struct kobj_type blk_queue_ktype;
12 12
13void rq_init(struct request_queue *q, struct request *rq);
14void init_request_from_bio(struct request *req, struct bio *bio); 13void init_request_from_bio(struct request *req, struct bio *bio);
15void blk_rq_bio_prep(struct request_queue *q, struct request *rq, 14void blk_rq_bio_prep(struct request_queue *q, struct request *rq,
16 struct bio *bio); 15 struct bio *bio);