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

Nilay Shroff nilay at linux.ibm.com
Mon Nov 9 22:49:02 PST 2026


On 11/10/26 3:17 AM, Bart Van Assche wrote:
> On 11/8/26 7:28 PM, Nilay Shroff wrote:
>> +        __assume_ctx_lock(&ns->subsys->lock);
> 
> Please pass "subsys" as an additional argument to nvmet_get_smart_log_all() instead of using __assume_ctx_lock().
> As I stated in my previous mail, it appears that the context analyzer recognizes
subsys->lock as a near match, but cannot establish that it is the same mutex as
ns->subsys->lock. That's why passing subsys alone doesn't resolve the warning,
and I used __assume_ctx_lock() to explicitly establish the capability expected
by the field annotation.

If there's another way to express this lock equivalence to the analyzer, I'm happy
to try it.

Thanks,
--Nilay



More information about the Linux-nvme mailing list