From: John Garry <john.g.garry@oracle.com>
To: axboe@kernel.dk, paolo.valente@unimore.it
Cc: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
jiapeng.chong@linux.alibaba.com, hch@lst.de,
John Garry <john.g.garry@oracle.com>
Subject: [PATCH 2/3] block: Drop locking annotation for limits_lock
Date: Fri, 14 Jun 2024 09:03:44 +0000 [thread overview]
Message-ID: <20240614090345.655716-3-john.g.garry@oracle.com> (raw)
In-Reply-To: <20240614090345.655716-1-john.g.garry@oracle.com>
Currently compiling block/blk-settings.c with C=1 gives the following
warning:
block/blk-settings.c:262:9: warning: context imbalance in 'queue_limits_commit_update' - wrong count at exit
request_queue.limits_lock is a mutex. Sparse locking annotation for
mutexes are currently not supported - see [0] - so drop that locking
annotation.
[0] https://lore.kernel.org/lkml/cover.1579893447.git.jbi.octave@gmail.com/T/#mbb8bda6c0a7ca7ce19f46df976a8e3b489745488
Fixes: d690cb8ae14bd ("block: add an API to atomically update queue limits")
Signed-off-by: John Garry <john.g.garry@oracle.com>
---
block/blk-settings.c | 1 -
include/linux/blkdev.h | 1 -
2 files changed, 2 deletions(-)
diff --git a/block/blk-settings.c b/block/blk-settings.c
index effeb9a639bb..cdc7845260b9 100644
--- a/block/blk-settings.c
+++ b/block/blk-settings.c
@@ -254,7 +254,6 @@ int blk_set_default_limits(struct queue_limits *lim)
*/
int queue_limits_commit_update(struct request_queue *q,
struct queue_limits *lim)
- __releases(q->limits_lock)
{
int error = blk_validate_limits(lim);
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 24c36929920b..f798c9c6eb30 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -904,7 +904,6 @@ static inline unsigned int blk_chunk_sectors_left(sector_t offset,
*/
static inline struct queue_limits
queue_limits_start_update(struct request_queue *q)
- __acquires(q->limits_lock)
{
mutex_lock(&q->limits_lock);
return q->limits;
--
2.31.1
next prev parent reply other threads:[~2024-06-14 9:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-14 9:03 [PATCH 0/3] Some block sparse fixes John Garry
2024-06-14 9:03 ` [PATCH 1/3] bdev: make blockdev_mnt static John Garry
2024-06-14 16:35 ` Bart Van Assche
2024-06-14 9:03 ` John Garry [this message]
2024-06-14 16:36 ` [PATCH 2/3] block: Drop locking annotation for limits_lock Bart Van Assche
2024-06-14 16:47 ` Christoph Hellwig
2024-06-14 9:03 ` [PATCH 3/3] block: BFQ: Refactor bfq_exit_icq() to silence sparse warning John Garry
2024-06-14 16:37 ` Bart Van Assche
2024-06-16 21:30 ` [PATCH 0/3] Some block sparse fixes 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=20240614090345.655716-3-john.g.garry@oracle.com \
--to=john.g.garry@oracle.com \
--cc=axboe@kernel.dk \
--cc=hch@lst.de \
--cc=jiapeng.chong@linux.alibaba.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=paolo.valente@unimore.it \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox