Commit 92455364 authored by Mike Snitzer's avatar Mike Snitzer

dm vdo memory-alloc: simplify allocations_allowed()

Signed-off-by: default avatarMike Snitzer <snitzer@kernel.org>
Signed-off-by: default avatarSusan LeGendre-McGhee <slegendr@redhat.com>
Signed-off-by: default avatarMatthew Sakai <msakai@redhat.com>
parent dcd1332b
...@@ -20,11 +20,9 @@ ...@@ -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;
} }
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment