X-Git-Url: http://git.monstr.eu/?a=blobdiff_plain;f=block%2Fblk-core.c;h=0d4d6b1e5d2554ff2d5661a208a7e4d4fd5a6258;hb=be863b9e4348a791e360d25611a1bdde2c9595ed;hp=04477697ee4b4df8de9edb403ffa45b8286fe345;hpb=e98e03d075537a14928661ebfbfcde34b0eced1a;p=linux-2.6-microblaze.git diff --git a/block/blk-core.c b/block/blk-core.c index 04477697ee4b..0d4d6b1e5d25 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -122,7 +122,6 @@ void blk_rq_init(struct request_queue *q, struct request *rq) rq->internal_tag = BLK_MQ_NO_TAG; rq->start_time_ns = ktime_get_ns(); rq->part = NULL; - refcount_set(&rq->ref, 1); blk_crypto_rq_set_defaults(rq); } EXPORT_SYMBOL(blk_rq_init); @@ -833,8 +832,11 @@ static noinline_for_stack bool submit_bio_checks(struct bio *bio) } } - if (!test_bit(QUEUE_FLAG_POLL, &q->queue_flags)) + if (!test_bit(QUEUE_FLAG_POLL, &q->queue_flags)) { + /* can't support alloc cache if we turn off polling */ + bio_clear_flag(bio, BIO_PERCPU_CACHE); bio->bi_opf &= ~REQ_HIPRI; + } switch (bio_op(bio)) { case REQ_OP_DISCARD: