dm vdo memory-alloc: simplify allocations_allowed()

Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Signed-off-by: Susan LeGendre-McGhee <slegendr@redhat.com>
Signed-off-by: Matthew Sakai <msakai@redhat.com>
This commit is contained in:
Mike Snitzer 2024-02-09 14:14:21 -06:00
parent dcd1332bb5
commit 924553644a

View File

@ -20,11 +20,9 @@
*/ */
static struct thread_registry allocating_threads; static struct thread_registry allocating_threads;
static bool allocations_allowed(void) static inline bool allocations_allowed(void)
{ {
const bool *pointer = vdo_lookup_thread(&allocating_threads); return vdo_lookup_thread(&allocating_threads) != NULL;
return (pointer != NULL) ? *pointer : false;
} }
/* /*