On 11/1/25 02:48, Bart Van Assche wrote:
> Hi Damien,
> 
> disk_update_zone_resources() only has a single caller and just below the
> only call of this function the following code is present:
> 
>       if (ret) {
>               unsigned int memflags = blk_mq_freeze_queue(q);
> 
>               disk_free_zone_resources(disk);
>               blk_mq_unfreeze_queue(q, memflags);
>       }
> 
> Shouldn't this code be moved into disk_update_zone_resources() such that
> error handling happens without unfreezing and refreezing the request
> queue?

Check the code again. disk_free_zone_resources() if the report zones callbacks
return an error, and in that case disk_update_zone_resources() is not called.
So having this call as it is cover all cases.

-- 
Damien Le Moal
Western Digital Research

Reply via email to