[PATCH v2] nvmet: implement valid sqhd values in completions

Christoph Hellwig hch at infradead.org
Mon Sep 18 09:05:12 PDT 2017


On Mon, Sep 18, 2017 at 09:00:32AM -0700, James Smart wrote:
> I think the likely statement is erroneous. In order to get to this point the
> transport has to call nvmet_req_init(), and the first thing it does is
> assign the sq and there's never an unset. So any completion of the routine,
> even if failure to nvmet_req_init() has sq set.  There's also several other
> cases in nvmet_req_init() where if the transport set it to NULL an oops
> would occur.

That seems to be the case now - this check and comment looks like a
leftover from earlier versions where this wasn't the case.

> I'll send a revised patch that also removes the "if (likely())" test.

Yes, please do.



More information about the Linux-nvme mailing list