Re: [PATCH] zloop: fix the error code in the blk_mq_alloc_disk message
From: Damien Le Moal
Date: Tue Nov 03 2026 - 00:06:13 EST
On 10/31/26 23:17, shao.mingyin@xxxxxxxxxx wrote:
> From: Shao Mingyin <shao.mingyin@xxxxxxxxxx>
>
> When blk_mq_alloc_disk() fails, "ret" still holds the zero returned by the
> preceding blk_mq_alloc_tag_set() call, so the error message always reports
> "err=0". Save PTR_ERR(zlo->disk) in "ret" before printing it, like the
> blk_mq_alloc_tag_set() and add_disk() failure paths do.
>
> Fixes: eb0570c7df23 ("block: new zoned loop block device driver")
> Signed-off-by: Shao Mingyin <shao.mingyin@xxxxxxxxxx>
Reviewed-by: Damien Le Moal <dlemoal@xxxxxxxxxx>
--
Damien Le Moal
Western Digital Research