commit | 609f6ea1c9cdfe0c43a927e13205a57d0c266d5a | [log] [tgz] |
---|---|---|
author | majianpeng <majianpeng@gmail.com> | Wed Dec 21 15:27:24 2011 +0100 |
committer | Jens Axboe <axboe@kernel.dk> | Wed Dec 21 15:27:24 2011 +0100 |
tree | 4bb34c0004e1650ee44f23105dc9362908470282 | |
parent | 6ae0516b8a50ece5d766be608a305707e0450060 [diff] |
block: re-use existing 'reading' variable instead of checking direction again Signed-off-by: majianpeng <majianpeng@gmail.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
diff --git a/block/blk-map.c b/block/blk-map.c index 164cd00..623e1cd 100644 --- a/block/blk-map.c +++ b/block/blk-map.c
@@ -311,7 +311,7 @@ if (IS_ERR(bio)) return PTR_ERR(bio); - if (rq_data_dir(rq) == WRITE) + if (!reading) bio->bi_rw |= REQ_WRITE; if (do_copy)