On Mon, Aug 01, 2016 at 12:00:21PM +0200, Michal Hocko wrote: ... > diff --git a/mm/memcontrol.c b/mm/memcontrol.c > index c265212bec8c..eb7e39c2d948 100644 > --- a/mm/memcontrol.c > +++ b/mm/memcontrol.c > @@ -2543,6 +2543,11 @@ static int mem_cgroup_resize_memsw_limit(struct mem_cgroup *memcg, > return ret; > } > > +static inline bool soft_limit_tree_empty(struct mem_cgroup_tree_per_node *mctz) > +{ > + return rb_last(&mctz->rb_root) == NULL; > +} > + I don't think traversing rb tree as rb_last() does w/o holding the lock is a good idea. Why is RB_EMPTY_ROOT() insufficient here? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@xxxxxxxxx. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: <a href=mailto:"dont@xxxxxxxxx"> email@xxxxxxxxx </a>