[PATCHv2 04/17] nvme: add Clang context annotations for nvme_ns_head::requeue_list
Nilay Shroff
nilay at linux.ibm.com
Fri Jun 26 07:24:11 PDT 2026
On 6/26/26 12:07 PM, Christoph Hellwig wrote:
>> 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 :(
>
Personally, I am also not a big fan of scoped_gurad(...) and friends...
> 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.
>
Yes this one could be avoided by removing bio_list_init() here.
Will update this in next patchset.
Thanks,
--Nilay
More information about the Linux-nvme
mailing list