> +/* > + * Returns true if request was not in flight. > + */ > +static inline bool blk_mq_mark_complete(struct request *rq) > +{ > + return (cmpxchg(&rq->state, MQ_RQ_IN_FLIGHT, MQ_RQ_COMPLETE) != > + MQ_RQ_IN_FLIGHT); > +} This needs a much better comment describing when and how to use it. Also the outer braces in the return statement are not required.