diff --git a/block/blk-core.c b/block/blk-core.c index f8cb099..7e98677 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -1282,8 +1282,10 @@ get_rq: init_request_from_bio(req, bio); if (test_bit(QUEUE_FLAG_SAME_COMP, &q->queue_flags) || - bio_flagged(bio, BIO_CPU_AFFINE)) - req->cpu = smp_processor_id(); + bio_flagged(bio, BIO_CPU_AFFINE)) { + req->cpu = get_cpu(); + put_cpu(); + } plug = current->plug; if (plug) {