On 2/6/20 11:46 AM, Chaitanya Kulkarni wrote: > Hi Jan, > > What do you think about following patch on the top of yours ? > > The new helper that I've added on the top of your patch will also > future uses of the rcu_dereference_protected(). e.g. blktrace > extension [1] support that I'm working on. > > P.S. it is compile only if your okay I'll send a separate patch. > > + > +/* Dereference q->blk_trace with q->blk_trace_mutex check only. */ > +static inline struct blk_trace *blk_trace_rcu_deref(struct > request_queue *q) > +{ > + return rcu_dereference_protected(q->blk_trace, > + > lockdep_is_held(&q->blk_trace_mutex)); > +} Let's please not do that, it serves no real purpose and it just obfuscates what's really going on. -- Jens Axboe