[PATCH v2 02/22] nvmet: fix nvmet_ns::bdev access using nvmet_subsys::lock

Bart Van Assche bvanassche at acm.org
Wed Nov 18 16:08:09 PST 2026


On 11/17/26 11:34 PM, Nilay Shroff wrote:
> +		/*
> +		 * Both ctrl->subsys->lock and ns->subsys->lock refer to the
> +		 * same lock. However there's no way for us to annotate such
> +		 * locking semantics using clang context annotation. So
> +		 * explicitly assert the capability.
> +		 */
> +		__assume_ctx_lock(&ns->subsys->lock);

__assume_ctx_lock() should be avoided whenever possible. Please either
modify this function such that "subsys" is passed as an argument or use
lockdep_assert_held().

Thanks,

Bart.



More information about the Linux-nvme mailing list