[PATCH] nvme: free pre-allocated queue if create ioq goes wrong
Sagi Grimberg
sagi at grimberg.me
Sun Jan 14 01:18:06 PST 2018
Minwoo,
> If either create-sq or create-cq is failed with an NVMe status,
> nvme_init_queue() is invoked which was not expected to be called in
> nvme_create_queue().
> To prevent this inconsistency of queue_count, free queue(s) already
> allocated in nvme_create_io_queues() when it goes wrong in
> nvme_create_queue().
The fix looks good, but I think it would be better to cleanup the queue
in the call site where nvme_alloc_queue is called, having it here is a
bit awkward IMO.
More information about the Linux-nvme
mailing list