Thread (19 messages) flat view 19 messages, 3 authors, 2021-02-24

Re: [PATCH 01/14] nvme-core: remove duplicate kfree in init identify

From: Christoph Hellwig <hch@lst.de>
Date: 2021-02-24 16:35:25

On Tue, Feb 16, 2021 at 04:10:19PM -0800, Chaitanya Kulkarni wrote:
In nvme_init_identify() once we initialize nvme_mpath_init() we free
the id with kfree(). This is needed since we just return from all the
following calls to nvme_mpath_init(), that also makes kfree() call
duplicate.

Instead of returning after nvme_mpath_init() jump to the lable
out_free and remove the duplicate call to the kfree() since out_free
label already has one..
Hmm.  I'd rather split nvme_init_identify.  Rename the publically
called function to something like nvme_init_ctrl_finish, and
the split out a nvme_init_identify for just the section that deals
with the id_ns data.

_______________________________________________
Linux-nvme mailing list
Linux-nvme@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-nvme
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help