Re: [PATCH 2/7] block: Document more locking requirements

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 11/30/2017 05:08 PM, Bart Van Assche wrote:
> This patch does not change any functionality.

Unless these actually found real bugs, I think it's pointless.
Add a comment. And this:
 
> @@ -1003,9 +1007,14 @@ bool blk_mq_get_driver_tag(struct request *rq, struct blk_mq_hw_ctx **hctx,
>  static int blk_mq_dispatch_wake(wait_queue_entry_t *wait, unsigned mode,
>  				int flags, void *key)
>  {
> -	struct blk_mq_hw_ctx *hctx;
> +	struct blk_mq_hw_ctx *hctx =
> +		container_of(wait, struct blk_mq_hw_ctx, dispatch_wait);
> +
> +#ifdef CONFIG_LOCKDEP
> +	struct sbq_wait_state *ws = bt_wait_ptr(&hctx->tags->bitmap_tags, hctx);
>  
> -	hctx = container_of(wait, struct blk_mq_hw_ctx, dispatch_wait);
> +	lockdep_assert_held(&ws->wait.lock);
> +#endif

we're definitely not doing.

-- 
Jens Axboe




[Index of Archives]     [Linux RAID]     [Linux SCSI]     [Linux ATA RAID]     [IDE]     [Linux Wireless]     [Linux Kernel]     [ATH6KL]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Device Mapper]

  Powered by Linux