>>> On 28.08.15 at 20:53, <konrad.w...@oracle.com> wrote:
> Manipulating the obj-> structures requires us to hold the
> pool->rwlock lock. Lets make that obvious in this function to
> catch any errant users (none found, but we may in future).
> 
> Signed-off-by: Konrad Rzeszutek Wilk <konrad.w...@oracle.com>
> Reviewed-by: Andrew Cooper <andrew.coop...@citrix.com>
> Acked-by: Wei Liu <wei.l...@citrix.com>
> ---
>  xen/common/tmem.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/xen/common/tmem.c b/xen/common/tmem.c
> index ed9b975..c1ffe79 100644
> --- a/xen/common/tmem.c
> +++ b/xen/common/tmem.c
> @@ -916,6 +916,9 @@ 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;
>  
> +    ASSERT(obj->pool && obj->pool != NULL);

Was this the same in v2 and I overlooked it? Anyway,

    ASSERT(obj->pool);

is clearly enough.

Jan


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel

Reply via email to