Commit c3042a54 authored by John Garry's avatar John Garry Committed by Jens Axboe

block: Drop locking annotation for limits_lock

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: d690cb8a ("block: add an API to atomically update queue limits")
Signed-off-by: default avatarJohn Garry <john.g.garry@oracle.com>
Reviewed-by: default avatarBart Van Assche <bvanassche@acm.org>
Reviewed-by: default avatarChristoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20240614090345.655716-3-john.g.garry@oracle.comSigned-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent d9c23321
...@@ -303,7 +303,6 @@ int blk_set_default_limits(struct queue_limits *lim) ...@@ -303,7 +303,6 @@ int blk_set_default_limits(struct queue_limits *lim)
*/ */
int queue_limits_commit_update(struct request_queue *q, int queue_limits_commit_update(struct request_queue *q,
struct queue_limits *lim) struct queue_limits *lim)
__releases(q->limits_lock)
{ {
int error; int error;
......
...@@ -893,7 +893,6 @@ static inline unsigned int blk_chunk_sectors_left(sector_t offset, ...@@ -893,7 +893,6 @@ static inline unsigned int blk_chunk_sectors_left(sector_t offset,
*/ */
static inline struct queue_limits static inline struct queue_limits
queue_limits_start_update(struct request_queue *q) queue_limits_start_update(struct request_queue *q)
__acquires(q->limits_lock)
{ {
mutex_lock(&q->limits_lock); mutex_lock(&q->limits_lock);
return q->limits; return q->limits;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment