> list_for_each_entry(rq, &q->queue_head, queuelist) { > - if (blk_pm_allow_request(rq)) > - return rq; > - > - if (rq->rq_flags & RQF_SOFTBARRIER) > - break; > +#ifdef CONFIG_PM > + /* > + * If a request gets queued in state RPM_SUSPENDED > + * then that's a kernel bug. > + */ > + WARN_ON_ONCE(q->rpm_status == RPM_SUSPENDED); > +#endif I hate this ifdef, but it probably isnt worth adding a helper for this assert, so I guess we'll have to live with it.. Otherwise this looks fine: Reviewed-by: Christoph Hellwig <hch@xxxxxx>