[PATCH v3 18/30] null_blk: Introduce zone_append_max_sectors attribute

Bart Van Assche bvanassche at acm.org
Fri Mar 29 14:35:07 PDT 2024


On 3/27/24 5:43 PM, Damien Le Moal wrote:
> @@ -1953,7 +1961,7 @@ static int null_add_dev(struct nullb_device *dev)
>   
>   	rv = add_disk(nullb->disk);
>   	if (rv)
> -		goto out_ida_free;
> +		goto out_cleanup_zone;
>   

The above change is unrelated to the introduction of
zone_append_max_sectors and hence should not be in this patch.
Additionally, the order of cleanup actions in the error path seems
wrong to me. null_init_zoned_dev() is called before blk_mq_alloc_disk().
Hence, the put_disk() call in the error path should occur before the
null_free_zoned_dev() call.

Thanks,

Bart.



More information about the Linux-nvme mailing list