[PATCHv2 04/17] nvme: add Clang context annotations for nvme_ns_head::requeue_list
Christoph Hellwig
hch at lst.de
Thu Jun 25 23:37:38 PDT 2026
> diff --git a/drivers/nvme/host/multipath.c b/drivers/nvme/host/multipath.c
> index a275c03e7c59..9e7f12fe8cd6 100644
> --- a/drivers/nvme/host/multipath.c
> +++ b/drivers/nvme/host/multipath.c
> @@ -706,8 +706,8 @@ int nvme_mpath_alloc_disk(struct nvme_ctrl *ctrl, struct nvme_ns_head *head)
> struct queue_limits lim;
>
> mutex_init(&head->lock);
> - bio_list_init(&head->requeue_list);
> - spin_lock_init(&head->requeue_lock);
> + scoped_guard(spinlock_init, &head->requeue_lock)
> + bio_list_init(&head->requeue_list);
We had that discussion before, but this kind of annotation is just
idiotic :(
We really to be able to just initialize fields without annotations
before they are first published. Now bio_list_init is actually a no-op
on a zero-allocated structure, so we could just drop it here, but this
is a more general problem.
More information about the Linux-nvme
mailing list