Re: [PATCH 2/4] nvmet: propagate percpu_ref_init() failure in nvmet_ns_enable()
Christoph Hellwig <[email protected]> Thu, 30 Jul 2026 13:38:04 +0200
| Newsgroups | org.infradead.lists.linux-nvme |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Jul 30, 2026 at 12:31:03PM +0800, Guixin Liu wrote: > The return value of percpu_ref_init() is discarded. At this point ret is > 0 from the preceding successful steps, so when the allocation inside > percpu_ref_init() fails the code jumps to the out_pr_exit cleanup chain > which ends with "return ret", i.e. reports success. The configfs enable > store then tells userspace the namespace was enabled even though it was > not and its backing device has already been torn down. Looks good: Reviewed-by: Christoph Hellwig <[email protected]>