[PATCHv2 1/4] nvme: factor metadata handling out of __nvme_submit_user_cmd

Christoph Hellwig hch at lst.de
Wed Aug 30 01:14:43 PDT 2017


> did we move the kfree(meta) here in porpose ?
> I think we'll leak in the "write" case.

Oops, my fault.

> In general, I prefer allocating and freeing the meta buffer in the same 
> function but maybe it make sense to act otherwise here.

Think of nvme_add_user_metadata as the memory allocator, given
that it returns the buffer :)



More information about the Linux-nvme mailing list