xmalloc: remove struct xmem_pool init_region
authorPaul Durrant <paul.durrant@citrix.com>
Mon, 8 Jul 2019 08:30:39 +0000 (10:30 +0200)
committerJan Beulich <jbeulich@suse.com>
Mon, 8 Jul 2019 08:30:39 +0000 (10:30 +0200)
commitf40785f1500c3728d5a40b4c6c6d46646a87c141
tree19d61a44ee7581a5254ddcdaec05d39b61899303
parent843cec0de800a5f925f8071a7f58f3fb1c6b6eb6
xmalloc: remove struct xmem_pool init_region

This patch dispenses with the init_region. It's simply not necessary
(pools will still happily grow and shrink on demand in its absence) and the
code can be shortended by removing it. It also avoids the sole evaluation
of ADD_REGION without holding the pool lock (which is unsafe).

NOTE: The if statement that is removed from xmem_pool_destroy() has actually
      been bogus since commit 6009f4dd "Transcendent memory ("tmem") for
      Xen." when the allocation of the init_region was moved out of
      xmem_pool_create().

Signed-off-by: Paul Durrant <paul.durrant@citrix.com>
Suggested-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/common/xmalloc_tlsf.c
xen/include/xen/xmalloc.h