From: Bart Van Assche <bvanassche@acm.org>
To: Jens Axboe <axboe@kernel.dk>
Cc: linux-block@vger.kernel.org, Christoph Hellwig <hch@lst.de>,
Marco Elver <elver@google.com>,
Bart Van Assche <bvanassche@acm.org>,
Nathan Chancellor <nathan@kernel.org>
Subject: [PATCH v4 11/12] block/mq-deadline: Make the lock context annotations compatible with Clang
Date: Mon, 11 May 2026 09:30:53 -0700 [thread overview]
Message-ID: <20260511163100.1887263-12-bvanassche@acm.org> (raw)
In-Reply-To: <20260511163100.1887263-1-bvanassche@acm.org>
While sparse ignores the __acquires() and __releases() arguments, Clang
verifies these. Make the arguments of __acquires() and __releases()
acceptable for Clang.
Signed-off-by: Bart Van Assche <bvanassche@acm.org>
---
block/mq-deadline.c | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/block/mq-deadline.c b/block/mq-deadline.c
index 95917a88976f..824bfc17b2c6 100644
--- a/block/mq-deadline.c
+++ b/block/mq-deadline.c
@@ -794,11 +794,15 @@ static const struct elv_fs_entry deadline_attrs[] = {
__ATTR_NULL
};
+#define RQ_FROM_SEQ_FILE(m) ((struct request_queue *)(m)->private)
+#define DD_DATA_FROM_RQ(rq) \
+ ((struct deadline_data *)(rq)->elevator->elevator_data)
+
#ifdef CONFIG_BLK_DEBUG_FS
#define DEADLINE_DEBUGFS_DDIR_ATTRS(prio, data_dir, name) \
static void *deadline_##name##_fifo_start(struct seq_file *m, \
loff_t *pos) \
- __acquires(&dd->lock) \
+ __acquires(&DD_DATA_FROM_RQ(RQ_FROM_SEQ_FILE(m))->lock) \
{ \
struct request_queue *q = m->private; \
struct deadline_data *dd = q->elevator->elevator_data; \
@@ -819,7 +823,7 @@ static void *deadline_##name##_fifo_next(struct seq_file *m, void *v, \
} \
\
static void deadline_##name##_fifo_stop(struct seq_file *m, void *v) \
- __releases(&dd->lock) \
+ __releases(&DD_DATA_FROM_RQ(RQ_FROM_SEQ_FILE(m))->lock) \
{ \
struct request_queue *q = m->private; \
struct deadline_data *dd = q->elevator->elevator_data; \
@@ -921,7 +925,7 @@ static int dd_owned_by_driver_show(void *data, struct seq_file *m)
}
static void *deadline_dispatch_start(struct seq_file *m, loff_t *pos)
- __acquires(&dd->lock)
+ __acquires(&DD_DATA_FROM_RQ(RQ_FROM_SEQ_FILE(m))->lock)
{
struct request_queue *q = m->private;
struct deadline_data *dd = q->elevator->elevator_data;
@@ -939,7 +943,7 @@ static void *deadline_dispatch_next(struct seq_file *m, void *v, loff_t *pos)
}
static void deadline_dispatch_stop(struct seq_file *m, void *v)
- __releases(&dd->lock)
+ __releases(&DD_DATA_FROM_RQ(RQ_FROM_SEQ_FILE(m))->lock)
{
struct request_queue *q = m->private;
struct deadline_data *dd = q->elevator->elevator_data;
next prev parent reply other threads:[~2026-05-11 16:31 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-11 16:30 [PATCH v4 00/12] Enable lock context analysis Bart Van Assche
2026-05-11 16:30 ` [PATCH v4 01/12] block: Annotate the queue limits functions Bart Van Assche
2026-05-11 16:30 ` [PATCH v4 02/12] block/bdev: Annotate the blk_holder_ops callback functions Bart Van Assche
2026-05-11 22:19 ` Marco Elver
2026-05-12 19:28 ` Bart Van Assche
2026-05-13 6:54 ` Marco Elver
2026-05-13 13:36 ` Nathan Chancellor
2026-05-13 22:13 ` Bart Van Assche
2026-05-13 23:06 ` Marco Elver
2026-05-14 0:31 ` Bart Van Assche
2026-05-11 16:30 ` [PATCH v4 03/12] block/cgroup: Split blkg_conf_prep() Bart Van Assche
2026-05-11 16:30 ` [PATCH v4 04/12] block/cgroup: Split blkg_conf_exit() Bart Van Assche
2026-05-11 16:30 ` [PATCH v4 05/12] block/cgroup: Improve lock context annotations Bart Van Assche
2026-05-11 16:30 ` [PATCH v4 06/12] block/cgroup: Inline blkg_conf_{open,close}_bdev_frozen() Bart Van Assche
2026-05-11 16:30 ` [PATCH v4 07/12] block/crypto: Annotate the crypto functions Bart Van Assche
2026-05-11 16:30 ` [PATCH v4 08/12] block/blk-iocost: Add lock context annotations Bart Van Assche
2026-05-11 16:30 ` [PATCH v4 09/12] block/blk-mq-debugfs: Improve " Bart Van Assche
2026-05-11 16:30 ` [PATCH v4 10/12] block/kyber: Make the lock context annotations compatible with Clang Bart Van Assche
2026-05-11 16:30 ` Bart Van Assche [this message]
2026-05-11 16:30 ` [PATCH v4 12/12] block: Enable lock context analysis Bart Van Assche
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=20260511163100.1887263-12-bvanassche@acm.org \
--to=bvanassche@acm.org \
--cc=axboe@kernel.dk \
--cc=elver@google.com \
--cc=hch@lst.de \
--cc=linux-block@vger.kernel.org \
--cc=nathan@kernel.org \
/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.