mirror of
https://github.com/torvalds/linux.git
synced 2024-11-14 16:12:02 +00:00
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:
parent
dcd1332bb5
commit
924553644a
@ -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;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
Loading…
Reference in New Issue
Block a user