On Tue, 1 Dec 2020 16:28:47 -0500
Steven Rostedt <[email protected]> wrote:

> On Tue,  1 Dec 2020 12:32:49 -0800
> Axel Rasmussen <[email protected]> wrote:
> 
> > +/* Called with reg_lock held. */  
> 
> The above comment is reduntant, as the lockdep_is_held() below also suggest
> that it is ;-)
>


> 
> >  static inline char *get_memcg_path_buf(void)
> >  {
> > +   char *buf;
> >     int idx;
> >  
> > +   rcu_read_lock();  
> 
> The caller of get_mm_memcg_path() has preemption disabled, which is also
> now an RCU lock. So the rcu_read_lock() is somewhat redundant.


BTW, both of these comments are FYI. You can keep the comment and keep the
rcu_read_lock(). I was just stating that they are redundant, but keeping
them may make the code a bit more robust.

-- Steve

Reply via email to