summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBart Van Assche <bart.vanassche@sandisk.com>2017-02-01 10:20:56 -0800
committerJens Axboe <axboe@fb.com>2017-02-01 12:20:55 -0700
commitf3bcb0e60685acfc258a20caa0607e084271c482 (patch)
tree63778bc36a2ac94568f8f969c836ed6661966770
parentd486f1f204382557b5fbcb3ddbb5845cd4ba4e2c (diff)
blk-mq-debugfs: Add missing __acquires() / __releases() annotations
This patch avoids that sparse complains about lock imbalances. Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com> Reviewed-by: Omar Sandoval <osandov@fb.com> Signed-off-by: Jens Axboe <axboe@fb.com>
-rw-r--r--block/blk-mq-debugfs.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
index 1e2a4a2ff623..3a914e78ac11 100644
--- a/block/blk-mq-debugfs.c
+++ b/block/blk-mq-debugfs.c
@@ -95,6 +95,7 @@ static int blk_mq_debugfs_rq_show(struct seq_file *m, void *v)
}
static void *hctx_dispatch_start(struct seq_file *m, loff_t *pos)
+ __acquires(&hctx->lock)
{
struct blk_mq_hw_ctx *hctx = m->private;
@@ -110,6 +111,7 @@ static void *hctx_dispatch_next(struct seq_file *m, void *v, loff_t *pos)
}
static void hctx_dispatch_stop(struct seq_file *m, void *v)
+ __releases(&hctx->lock)
{
struct blk_mq_hw_ctx *hctx = m->private;
@@ -482,6 +484,7 @@ static const struct file_operations hctx_active_fops = {
};
static void *ctx_rq_list_start(struct seq_file *m, loff_t *pos)
+ __acquires(&ctx->lock)
{
struct blk_mq_ctx *ctx = m->private;
@@ -497,6 +500,7 @@ static void *ctx_rq_list_next(struct seq_file *m, void *v, loff_t *pos)
}
static void ctx_rq_list_stop(struct seq_file *m, void *v)
+ __releases(&ctx->lock)
{
struct blk_mq_ctx *ctx = m->private;