X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?p=pandora-kernel.git;a=blobdiff_plain;f=block%2Fblk-map.c;h=623e1cd4cffe997e71fbb54577bd42f220af64b3;hp=e663ac2d8e68f70ff17ce274f3cebec16c1dd18c;hb=refs%2Fheads%2Fpandora-3.2-hugetlb;hpb=8ce26169555cf5634263d39d3665e45300218a5e diff --git a/block/blk-map.c b/block/blk-map.c index e663ac2d8e68..623e1cd4cffe 100644 --- a/block/blk-map.c +++ b/block/blk-map.c @@ -204,10 +204,11 @@ int blk_rq_map_user_iov(struct request_queue *q, struct request *rq, if (!iov[i].iov_len) return -EINVAL; - if (uaddr & queue_dma_alignment(q)) { + /* + * Keep going so we check length of all segments + */ + if (uaddr & queue_dma_alignment(q)) unaligned = 1; - break; - } } if (unaligned || (q->dma_pad_mask & len) || map_data) @@ -310,7 +311,7 @@ int blk_rq_map_kern(struct request_queue *q, struct request *rq, void *kbuf, if (IS_ERR(bio)) return PTR_ERR(bio); - if (rq_data_dir(rq) == WRITE) + if (!reading) bio->bi_rw |= REQ_WRITE; if (do_copy)