summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorFilippo Muzzini <filippo.muzzini@outlook.it>2018-05-31 15:23:11 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2018-08-03 07:50:26 +0200
commit63019044fb8923974ba735a6b580a8ba16219471 (patch)
tree4411b316da82f1906153d2a905f8b6806404e0d7 /block
parent67226fb52c23e0df7d1e9f50fd29f880eb08ae69 (diff)
block, bfq: remove wrong lock in bfq_requests_merged
[ Upstream commit a12bffebc0c9d6a5851f062aaea3aa7c4adc6042 ] In bfq_requests_merged(), there is a deadlock because the lock on bfqq->bfqd->lock is held by the calling function, but the code of this function tries to grab the lock again. This deadlock is currently hidden by another bug (fixed by next commit for this source file), which causes the body of bfq_requests_merged() to be never executed. This commit removes the deadlock by removing the lock/unlock pair. Signed-off-by: Filippo Muzzini <filippo.muzzini@outlook.it> Signed-off-by: Paolo Valente <paolo.valente@linaro.org> Signed-off-by: Jens Axboe <axboe@kernel.dk> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'block')
-rw-r--r--block/bfq-iosched.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/block/bfq-iosched.c b/block/bfq-iosched.c
index 56c9cd01fd1d..4a4b7d3c909a 100644
--- a/block/bfq-iosched.c
+++ b/block/bfq-iosched.c
@@ -1678,7 +1678,6 @@ static void bfq_requests_merged(struct request_queue *q, struct request *rq,
if (!RB_EMPTY_NODE(&rq->rb_node))
goto end;
- spin_lock_irq(&bfqq->bfqd->lock);
/*
* If next and rq belong to the same bfq_queue and next is older
@@ -1702,7 +1701,6 @@ static void bfq_requests_merged(struct request_queue *q, struct request *rq,
bfq_remove_request(q, next);
- spin_unlock_irq(&bfqq->bfqd->lock);
end:
bfqg_stats_update_io_merged(bfqq_group(bfqq), next->cmd_flags);
}