[PATCH v3 04/18] nvmet-fcloop: refactor fcloop_nport_alloc
Christoph Hellwig
hch at lst.de
Thu Mar 20 23:05:50 PDT 2025
On Tue, Mar 18, 2025 at 02:38:56PM +0100, Daniel Wagner wrote:
> This means the new entry has always to be allocated first and then we
> either free it again or insert into the list, because it's not possible
> to allocate under the spinlock. Not that beautiful but correctness wins.
Yes, we do that a lot. And if finding an existing entry is the more
common outcome (I don't think it is here, but I'm not sure), you do
a search first, allocate, and then search again.
More information about the Linux-nvme
mailing list