diff options
Diffstat (limited to 'block')
-rw-r--r-- | block/blk-core.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index b5776c1fd52a..a496727df7ef 100644 --- a/block/blk-core.c +++ b/block/blk-core.c | |||
@@ -624,10 +624,6 @@ blk_alloc_request(struct request_queue *q, int rw, int priv, gfp_t gfp_mask) | |||
624 | 624 | ||
625 | blk_rq_init(q, rq); | 625 | blk_rq_init(q, rq); |
626 | 626 | ||
627 | /* | ||
628 | * first three bits are identical in rq->cmd_flags and bio->bi_rw, | ||
629 | * see bio.h and blkdev.h | ||
630 | */ | ||
631 | rq->cmd_flags = rw | REQ_ALLOCED; | 627 | rq->cmd_flags = rw | REQ_ALLOCED; |
632 | 628 | ||
633 | if (priv) { | 629 | if (priv) { |
@@ -2012,7 +2008,8 @@ EXPORT_SYMBOL_GPL(blk_end_request_callback); | |||
2012 | void blk_rq_bio_prep(struct request_queue *q, struct request *rq, | 2008 | void blk_rq_bio_prep(struct request_queue *q, struct request *rq, |
2013 | struct bio *bio) | 2009 | struct bio *bio) |
2014 | { | 2010 | { |
2015 | /* first two bits are identical in rq->cmd_flags and bio->bi_rw */ | 2011 | /* Bit 0 (R/W) is identical in rq->cmd_flags and bio->bi_rw, and |
2012 | we want BIO_RW_AHEAD (bit 1) to imply REQ_FAILFAST (bit 1). */ | ||
2016 | rq->cmd_flags |= (bio->bi_rw & 3); | 2013 | rq->cmd_flags |= (bio->bi_rw & 3); |
2017 | 2014 | ||
2018 | rq->nr_phys_segments = bio_phys_segments(q, bio); | 2015 | rq->nr_phys_segments = bio_phys_segments(q, bio); |