Re: [PATCH v3 07/18] nvme: add context annotations for nvme_subsystem::lock
From: Nilay Shroff
Date: Fri Jul 10 2026 - 04:19:13 EST
On 7/9/26 11:58 AM, Christoph Hellwig wrote:
On Mon, Jul 06, 2026 at 07:44:09PM +0530, Nilay Shroff wrote:Okay so I think lets instead annotate nvme_init_subsystem() with
Wrap the initialization of nvme_subsystem::nsheads with
context_unsafe(...) to suppress the context analysis warning emitted
for INIT_LIST_HEAD() during object initialization.
Still not a fan of that vs adding a proper helper.
__context_unsafe.
Sure, I'll split that into a separate preparatory patch in the nextnvme_ns_head is allocated with kzalloc(), so explicitly initializing
nvme_ns_head::delayed_removal_secs to 0 in nvme_mpath_alloc_disk() is
redundant. Remove the redundant initialization, which also avoids a
false positive from Clang's context analysis.
Please split that into a prep patch.
revision.
Thanks,
--Nilay