Skip to content

Commit

Permalink
block: fix blk_rq_map_kern bio direction flag
Browse files Browse the repository at this point in the history
This bug was introduced in 7b6d91d
"block: unify flags for struct bio and struct request"

Cc: Boaz Harrosh <bharrosh@panasas.com>
Signed-off-by: Benny Halevy <bhalevy@panasas.com>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
  • Loading branch information
Benny Halevy authored and Jens Axboe committed Sep 21, 2010
1 parent b0722cb commit a45dc2d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion block/blk-map.c
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ int blk_rq_map_kern(struct request_queue *q, struct request *rq, void *kbuf,
return PTR_ERR(bio);

if (rq_data_dir(rq) == WRITE)
bio->bi_rw |= (1 << REQ_WRITE);
bio->bi_rw |= REQ_WRITE;

if (do_copy)
rq->cmd_flags |= REQ_COPY_USER;
Expand Down

0 comments on commit a45dc2d

Please sign in to comment.