[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 2/8] tmem: Add ASSERT in obj_rb_insert for pool->rwlock lock.
>>> On 27.08.15 at 13:01, <konrad.wilk@xxxxxxxxxx> wrote: > --- a/xen/common/tmem.c > +++ b/xen/common/tmem.c > @@ -915,6 +915,11 @@ static int obj_rb_insert(struct rb_root *root, struct > tmem_object_root *obj) > { > struct rb_node **new, *parent = NULL; > struct tmem_object_root *this; > + struct tmem_pool *pool; > + > + pool = obj->pool; > + ASSERT(pool != NULL); > + ASSERT_WRITELOCK(&pool->pool_rwlock); Considering the new variable is used only in ASSERT()s, I'd recommend against its introduction. But it's your code ... Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |