On Mon, Jun 23, 2025 at 03:03:27PM +0530, Nilay Shroff wrote: > > > > This is a check for not having an elevator so far, right? Wouldn't > > !q->elevator be the more obvious check for that? Or am I missing > > something why that's not safe here? > > > This code runs in the context of an elevator switch, not as part of an > nr_hw_queues update. Hence, at this point, q->elevator has not yet been > updated to the new elevator we’re switching to, so accessing q->elevator > here would be incorrect. Since we've already stored the name of the target > elevator in ctx->name, we use that instead of referencing q->elevator here. Make sense, thanks.