Skip to content

Commit

Permalink
bfq: Drop pointless unlock-lock pair
Browse files Browse the repository at this point in the history
commit fc84e1f upstream.

In bfq_insert_request() we unlock bfqd->lock only to call
trace_block_rq_insert() and then lock bfqd->lock again. This is really
pointless since tracing is disabled if we really care about performance
and even if the tracepoint is enabled, it is a quick call.

CC: stable@vger.kernel.org
Tested-by: "yukuai (C)" <yukuai3@huawei.com>
Signed-off-by: Jan Kara <jack@suse.cz>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20220401102752.8599-5-jack@suse.cz
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
jankara authored and gregkh committed Jun 9, 2022
1 parent d916520 commit fe48ab0
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions block/bfq-iosched.c
Expand Up @@ -6154,11 +6154,8 @@ static void bfq_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
return;
}

spin_unlock_irq(&bfqd->lock);

trace_block_rq_insert(rq);

spin_lock_irq(&bfqd->lock);
bfqq = bfq_init_rq(rq);
if (!bfqq || at_head) {
if (at_head)
Expand Down

0 comments on commit fe48ab0

Please sign in to comment.