bsg: Add sparse annotations to bsg_request_fn()
diff mbox

Message ID 6dfb1793-ca6a-c3b6-b3fc-272e68ca6880@sandisk.com
State New
Headers show

Commit Message

Bart Van Assche Sept. 26, 2016, 2:54 a.m. UTC
Avoid that sparse complains about unbalanced lock actions.

Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
---
 block/bsg-lib.c | 2 ++
 1 file changed, 2 insertions(+)

Comments

Bart Van Assche Nov. 14, 2016, 4:55 p.m. UTC | #1
On 09/25/2016 07:54 PM, Bart Van Assche wrote:
> Avoid that sparse complains about unbalanced lock actions.
>
> Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
> ---
>  block/bsg-lib.c | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/block/bsg-lib.c b/block/bsg-lib.c
> index 650f427..b2a61e3 100644
> --- a/block/bsg-lib.c
> +++ b/block/bsg-lib.c
> @@ -161,6 +161,8 @@ failjob_rls_job:
>   * Drivers/subsys should pass this to the queue init function.
>   */
>  void bsg_request_fn(struct request_queue *q)
> +	__releases(q->queue_lock)
> +	__acquires(q->queue_lock)
>  {
>  	struct device *dev = q->queuedata;
>  	struct request *req;
>

Hi Jens,

Do you agree with this patch? If so, can you queue it for kernel v4.10?

Thanks,

Bart.
--
To unsubscribe from this list: send the line "unsubscribe linux-block" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Jens Axboe Nov. 14, 2016, 4:56 p.m. UTC | #2
On 11/14/2016 09:55 AM, Bart Van Assche wrote:
> On 09/25/2016 07:54 PM, Bart Van Assche wrote:
>> Avoid that sparse complains about unbalanced lock actions.
>>
>> Signed-off-by: Bart Van Assche <bart.vanassche@sandisk.com>
>> ---
>>  block/bsg-lib.c | 2 ++
>>  1 file changed, 2 insertions(+)
>>
>> diff --git a/block/bsg-lib.c b/block/bsg-lib.c
>> index 650f427..b2a61e3 100644
>> --- a/block/bsg-lib.c
>> +++ b/block/bsg-lib.c
>> @@ -161,6 +161,8 @@ failjob_rls_job:
>>   * Drivers/subsys should pass this to the queue init function.
>>   */
>>  void bsg_request_fn(struct request_queue *q)
>> +    __releases(q->queue_lock)
>> +    __acquires(q->queue_lock)
>>  {
>>      struct device *dev = q->queuedata;
>>      struct request *req;
>>
>
> Hi Jens,
>
> Do you agree with this patch? If so, can you queue it for kernel v4.10?

Yep, I'll add it for 4.10, thanks Bart.

Patch
diff mbox

diff --git a/block/bsg-lib.c b/block/bsg-lib.c
index 650f427..b2a61e3 100644
--- a/block/bsg-lib.c
+++ b/block/bsg-lib.c
@@ -161,6 +161,8 @@  failjob_rls_job:
  * Drivers/subsys should pass this to the queue init function.
  */
 void bsg_request_fn(struct request_queue *q)
+	__releases(q->queue_lock)
+	__acquires(q->queue_lock)
 {
 	struct device *dev = q->queuedata;
 	struct request *req;