summaryrefslogtreecommitdiffstats
path: root/block/blk-map.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2011-12-29 16:33:37 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2011-12-29 16:33:37 -0800
commit1cac8e884fbea0b10ee5692cd97e456b58c34ce5 (patch)
treeae6417c9015085e275caa84f755ee6f3a54d234e /block/blk-map.c
parentb0365c8d0cb6e79eb5f21418ae61ab511f31b575 (diff)
parentf2b20d436534f22ccc3f5ad172499fcb013bb315 (diff)
Merge branch 'for-linus' of git://git.kernel.dk/linux-block
* 'for-linus' of git://git.kernel.dk/linux-block: block: fix blk_queue_end_tag() block: re-use existing 'reading' variable instead of checking direction again block, cfq: fix empty queue crash caused by request merge
Diffstat (limited to 'block/blk-map.c')
-rw-r--r--block/blk-map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/block/blk-map.c b/block/blk-map.c
index 164cd005970..623e1cd4cff 100644
--- a/block/blk-map.c
+++ b/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)