The declarations of queue_limits_commit_update() and queue_limits_commit_update_frozen() in have a __releases(&q->limits_lock) annotation since these functions release the lock acquired by queue_limits_start_update(), and the declaration of queue_limits_set() has a __must_not_hold(&q->limits_lock) annotation. Add the same annotations to the definitions of these functions such that the declarations and the definitions are consistent. Signed-off-by: Bart Van Assche --- block/blk-settings.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/block/blk-settings.c b/block/blk-settings.c index 1f5ee2453269..8c02fdae0f40 100644 --- a/block/blk-settings.c +++ b/block/blk-settings.c @@ -552,6 +552,7 @@ 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; @@ -591,6 +592,7 @@ EXPORT_SYMBOL_GPL(queue_limits_commit_update); */ int queue_limits_commit_update_frozen(struct request_queue *q, struct queue_limits *lim) + __releases(&q->limits_lock) { unsigned int memflags; int ret; @@ -615,6 +617,7 @@ EXPORT_SYMBOL_GPL(queue_limits_commit_update_frozen); * Returns 0 if successful, else a negative error code. */ int queue_limits_set(struct request_queue *q, struct queue_limits *lim) + __must_not_hold(&q->limits_lock) { mutex_lock(&q->limits_lock); return queue_limits_commit_update(q, lim);