提交 a45dc2d2 编写于 作者: B Benny Halevy 提交者: Jens Axboe

block: fix blk_rq_map_kern bio direction flag

This bug was introduced in 7b6d91da
"block: unify flags for struct bio and struct request"

Cc: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: NBenny Halevy <bhalevy@panasas.com>
Signed-off-by: NJens Axboe <jaxboe@fusionio.com>
上级 b0722cb1
...@@ -307,7 +307,7 @@ int blk_rq_map_kern(struct request_queue *q, struct request *rq, void *kbuf, ...@@ -307,7 +307,7 @@ int blk_rq_map_kern(struct request_queue *q, struct request *rq, void *kbuf,
return PTR_ERR(bio); return PTR_ERR(bio);
if (rq_data_dir(rq) == WRITE) if (rq_data_dir(rq) == WRITE)
bio->bi_rw |= (1 << REQ_WRITE); bio->bi_rw |= REQ_WRITE;
if (do_copy) if (do_copy)
rq->cmd_flags |= REQ_COPY_USER; rq->cmd_flags |= REQ_COPY_USER;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册