[PATCH v3 07/18] nvme: add context annotations for nvme_subsystem::lock

Christoph Hellwig hch at lst.de
Wed Jul 8 23:28:45 PDT 2026


On Mon, Jul 06, 2026 at 07:44:09PM +0530, Nilay Shroff wrote:
> 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.

> nvme_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.




More information about the Linux-nvme mailing list