[PATCH v2 09/10] xen-blkfront: add error handling support for add_disk()

Juergen Gross jgross at suse.com
Thu Sep 30 06:07:44 PDT 2021


On 28.09.21 00:00, Luis Chamberlain wrote:
> We never checked for errors on device_add_disk() as this function
> returned void. Now that this is fixed, use the shiny new error
> handling. The function xlvbd_alloc_gendisk() typically does the
> unwinding on error on allocating the disk and creating the tag,
> but since all that error handling was stuffed inside
> xlvbd_alloc_gendisk() we must repeat the tag free'ing as well.
> 
> We set the info->rq to NULL to ensure blkif_free() doesn't crash
> on blk_mq_stop_hw_queues() on device_add_disk() error as the queue
> will be long gone by then.
> 
> Signed-off-by: Luis Chamberlain <mcgrof at kernel.org>

Reviewed-by: Juergen Gross <jgross at suse.com>


Juergen

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_0xB0DE9DD628BF132F.asc
Type: application/pgp-keys
Size: 3091 bytes
Desc: OpenPGP public key
URL: <http://lists.infradead.org/pipermail/linux-nvme/attachments/20210930/c68e68d5/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 495 bytes
Desc: OpenPGP digital signature
URL: <http://lists.infradead.org/pipermail/linux-nvme/attachments/20210930/c68e68d5/attachment-0001.sig>


More information about the Linux-nvme mailing list