summaryrefslogtreecommitdiffstats
path: root/block/blk-mq-sched.c
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2017-06-20 11:15:47 -0700
committerJens Axboe <axboe@kernel.dk>2017-06-20 19:27:14 -0600
commit7b6078146ccbe9bd165d578586b10ea092ac489e (patch)
tree757b09a4928cc73e404a3bfd0b0528de444873d4 /block/blk-mq-sched.c
parent332ebbf7f9efb31ffc363b99da548963ee3fd66d (diff)
downloadop-kernel-dev-7b6078146ccbe9bd165d578586b10ea092ac489e.zip
op-kernel-dev-7b6078146ccbe9bd165d578586b10ea092ac489e.tar.gz
blk-mq: Document locking assumptions
Document the locking assumptions in functions that modify blk_mq_ctx.rq_list to make it easier for humans to verify this code. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Cc: Hannes Reinecke <hare@suse.com> Cc: Omar Sandoval <osandov@fb.com> Cc: Ming Lei <ming.lei@redhat.com> Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-mq-sched.c')
-rw-r--r--block/blk-mq-sched.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/block/blk-mq-sched.c b/block/blk-mq-sched.c
index 9f02528..191bf82 100644
--- a/block/blk-mq-sched.c
+++ b/block/blk-mq-sched.c
@@ -150,6 +150,8 @@ static bool blk_mq_attempt_merge(struct request_queue *q,
struct request *rq;
int checked = 8;
+ lockdep_assert_held(&ctx->lock);
+
list_for_each_entry_reverse(rq, &ctx->rq_list, queuelist) {
bool merged = false;
OpenPOWER on IntegriCloud