tmem: drop direct usage of opt_tmem
authorDoug Goldstein <cardoe@cardoe.com>
Wed, 16 Mar 2016 14:11:00 +0000 (09:11 -0500)
committerKonrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Wed, 16 Mar 2016 14:54:15 +0000 (10:54 -0400)
commit6cddfb4ef6ff012d867592fb9e060f07ad5a20b2
treea5637be4233da074dad10eac7281253130d8c6ad
parentdba8bfb94dd3d51f7576dfbdd1d541aa75f90457
tmem: drop direct usage of opt_tmem

Most callers of tmem_freeable_pages() checked to see if by checking
opt_tmem before calling tmem_freeable_pages() but not all of them did. This
seemed like an oversight and to avoid similar situations like that,
stick the check of tmem into tmem_freeable_pages(). Similarly other
places should not directly check opt_tmem but instead use the
tmem_enabled() helper function.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
xen/arch/x86/setup.c
xen/common/memory.c
xen/common/page_alloc.c
xen/common/tmem.c