Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

block: re-use existing 'reading' variable instead of checking directi…

…on again

Signed-off-by: majianpeng <majianpeng@gmail.com>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
  • Loading branch information...
commit 609f6ea1c9cdfe0c43a927e13205a57d0c266d5a 1 parent 6ae0516
@majianpeng majianpeng authored axboe committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  block/blk-map.c
View
2  block/blk-map.c
@@ -311,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)
Please sign in to comment.
Something went wrong with that request. Please try again.