aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Van Assche <[email protected]>2021-06-17 17:44:46 -0700
committerJens Axboe <[email protected]>2021-06-21 15:03:40 -0600
commit3bd473f41ae990815d6f75d285b161eebf361278 (patch)
tree70fd10d2bedb20b1b8b0e08fa6747d08f25c0450
parent46eae2e32a6adc368230b4df0501082c5233e99c (diff)
block/mq-deadline: Add two lockdep_assert_held() statements
Document the locking strategy by adding two lockdep_assert_held() statements. Reviewed-by: Chaitanya Kulkarni <[email protected]> Reviewed-by: Damien Le Moal <[email protected]> Reviewed-by: Hannes Reinecke <[email protected]> Reviewed-by: Johannes Thumshirn <[email protected]> Reviewed-by: Himanshu Madhani <[email protected]> Cc: Damien Le Moal <[email protected]> Cc: Christoph Hellwig <[email protected]> Cc: Ming Lei <[email protected]> Signed-off-by: Bart Van Assche <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Jens Axboe <[email protected]>
-rw-r--r--block/mq-deadline.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/block/mq-deadline.c b/block/mq-deadline.c
index 31418e9ce9e2..191ff5ce629c 100644
--- a/block/mq-deadline.c
+++ b/block/mq-deadline.c
@@ -279,6 +279,8 @@ static struct request *__dd_dispatch_request(struct deadline_data *dd)
bool reads, writes;
int data_dir;
+ lockdep_assert_held(&dd->lock);
+
if (!list_empty(&dd->dispatch)) {
rq = list_first_entry(&dd->dispatch, struct request, queuelist);
list_del_init(&rq->queuelist);
@@ -501,6 +503,8 @@ static void dd_insert_request(struct blk_mq_hw_ctx *hctx, struct request *rq,
struct deadline_data *dd = q->elevator->elevator_data;
const int data_dir = rq_data_dir(rq);
+ lockdep_assert_held(&dd->lock);
+
/*
* This may be a requeue of a write request that has locked its
* target zone. If it is the case, this releases the zone lock.