aboutsummaryrefslogtreecommitdiffstats
path: root/block/blk-map.c
diff options
context:
space:
mode:
Diffstat (limited to 'block/blk-map.c')
-rw-r--r--block/blk-map.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/block/blk-map.c b/block/blk-map.c
index 916cfc96ffa0..955d75c1a58f 100644
--- a/block/blk-map.c
+++ b/block/blk-map.c
@@ -53,7 +53,8 @@ static int __blk_rq_map_user(struct request_queue *q, struct request *rq,
53 * direct dma. else, set up kernel bounce buffers 53 * direct dma. else, set up kernel bounce buffers
54 */ 54 */
55 uaddr = (unsigned long) ubuf; 55 uaddr = (unsigned long) ubuf;
56 if (!(uaddr & queue_dma_alignment(q)) && !(len & queue_dma_alignment(q))) 56 if (!(uaddr & queue_dma_alignment(q)) &&
57 !(len & queue_dma_alignment(q)))
57 bio = bio_map_user(q, NULL, uaddr, len, reading); 58 bio = bio_map_user(q, NULL, uaddr, len, reading);
58 else 59 else
59 bio = bio_copy_user(q, uaddr, len, reading); 60 bio = bio_copy_user(q, uaddr, len, reading);
@@ -144,7 +145,6 @@ unmap_rq:
144 blk_rq_unmap_user(bio); 145 blk_rq_unmap_user(bio);
145 return ret; 146 return ret;
146} 147}
147
148EXPORT_SYMBOL(blk_rq_map_user); 148EXPORT_SYMBOL(blk_rq_map_user);
149 149
150/** 150/**
@@ -179,7 +179,8 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,
179 /* we don't allow misaligned data like bio_map_user() does. If the 179 /* we don't allow misaligned data like bio_map_user() does. If the
180 * user is using sg, they're expected to know the alignment constraints 180 * user is using sg, they're expected to know the alignment constraints
181 * and respect them accordingly */ 181 * and respect them accordingly */
182 bio = bio_map_user_iov(q, NULL, iov, iov_count, rq_data_dir(rq)== READ); 182 bio = bio_map_user_iov(q, NULL, iov, iov_count,
183 rq_data_dir(rq) == READ);
183 if (IS_ERR(bio)) 184 if (IS_ERR(bio))
184 return PTR_ERR(bio); 185 return PTR_ERR(bio);
185 186
@@ -194,7 +195,6 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq,
194 rq->buffer = rq->data = NULL; 195 rq->buffer = rq->data = NULL;
195 return 0; 196 return 0;
196} 197}
197
198EXPORT_SYMBOL(blk_rq_map_user_iov); 198EXPORT_SYMBOL(blk_rq_map_user_iov);
199 199
200/** 200/**
@@ -227,7 +227,6 @@ int blk_rq_unmap_user(struct bio *bio)
227 227
228 return ret; 228 return ret;
229} 229}
230
231EXPORT_SYMBOL(blk_rq_unmap_user); 230EXPORT_SYMBOL(blk_rq_unmap_user);
232 231
233/** 232/**
@@ -260,5 +259,4 @@ int blk_rq_map_kern(struct request_queue *q, struct request *rq, void *kbuf,
260 rq->buffer = rq->data = NULL; 259 rq->buffer = rq->data = NULL;
261 return 0; 260 return 0;
262} 261}
263
264EXPORT_SYMBOL(blk_rq_map_kern); 262EXPORT_SYMBOL(blk_rq_map_kern);