From: Christoph Hellwig Date: Thu, 11 Jun 2020 06:44:45 +0000 (+0200) Subject: blk-mq: short cut the IPI path in blk_mq_force_complete_rq for !SMP X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=d6cc464cc58424e137eca5e0a53226291044f5d2;p=linux.git blk-mq: short cut the IPI path in blk_mq_force_complete_rq for !SMP Let the compile optimize out the entire IPI path, given that we are obviously not going to use it. Reviewed-by: Daniel Wagner Signed-off-by: Christoph Hellwig Signed-off-by: Jens Axboe --- diff --git a/block/blk-mq.c b/block/blk-mq.c index ea083f58d9da5..eef2f3c7f402f 100644 --- a/block/blk-mq.c +++ b/block/blk-mq.c @@ -727,7 +727,8 @@ void blk_mq_force_complete_rq(struct request *rq) return; } - if (!test_bit(QUEUE_FLAG_SAME_COMP, &q->queue_flags)) { + if (!IS_ENABLED(CONFIG_SMP) || + !test_bit(QUEUE_FLAG_SAME_COMP, &q->queue_flags)) { q->mq_ops->complete(rq); return; }