All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bart Van Assche <bart.vanassche@sandisk.com>
To: Jens Axboe <axboe@kernel.dk>
Cc: <linux-block@vger.kernel.org>,
	Bart Van Assche <bart.vanassche@sandisk.com>,
	Omar Sandoval <osandov@fb.com>
Subject: [PATCH 1/4] blk-mq-debugfs: Add missing __acquires() / __releases() annotations
Date: Wed, 1 Feb 2017 10:20:56 -0800	[thread overview]
Message-ID: <20170201182059.25601-2-bart.vanassche@sandisk.com> (raw)
In-Reply-To: <20170201182059.25601-1-bart.vanassche@sandisk.com>

This patch avoids that sparse complains about lock imbalances.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
Cc: Omar Sandoval <osandov@fb.com>
---
 block/blk-mq-debugfs.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/block/blk-mq-debugfs.c b/block/blk-mq-debugfs.c
index 5cd2b435a9f5..7bcd4b6edf83 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;
 
-- 
2.11.0

  reply	other threads:[~2017-02-01 18:20 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-02-01 18:20 [PATCH 0/4] Four patches for the blk-mq debugfs code Bart Van Assche
2017-02-01 18:20 ` Bart Van Assche [this message]
2017-02-01 19:07   ` [PATCH 1/4] blk-mq-debugfs: Add missing __acquires() / __releases() annotations Omar Sandoval
2017-02-01 18:20 ` [PATCH 2/4] blk-mq-debug: Avoid that sparse complains about req_flags_t usage Bart Van Assche
2017-02-01 19:08   ` Omar Sandoval
2017-02-01 18:20 ` [PATCH 3/4] blk-mq-debug: Make show() operations interruptible Bart Van Assche
2017-02-01 19:08   ` Omar Sandoval
2017-02-01 18:20 ` [PATCH 4/4] blk-mq-debug: Introduce debugfs_create_files() Bart Van Assche
2017-02-01 19:08   ` Omar Sandoval
2017-02-01 19:23 ` [PATCH 0/4] Four patches for the blk-mq debugfs code Jens Axboe

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170201182059.25601-2-bart.vanassche@sandisk.com \
    --to=bart.vanassche@sandisk.com \
    --cc=axboe@kernel.dk \
    --cc=linux-block@vger.kernel.org \
    --cc=osandov@fb.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.