From: Mike Snitzer Date: Fri, 9 Feb 2024 20:14:21 +0000 (-0600) Subject: dm vdo memory-alloc: simplify allocations_allowed() X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=924553644ac5ede5c03311ce218151f2bf7384e7;p=linux.git dm vdo memory-alloc: simplify allocations_allowed() Signed-off-by: Mike Snitzer Signed-off-by: Susan LeGendre-McGhee Signed-off-by: Matthew Sakai --- diff --git a/drivers/md/dm-vdo/memory-alloc.c b/drivers/md/dm-vdo/memory-alloc.c index 5cd387f9294e1..db085c1124bea 100644 --- a/drivers/md/dm-vdo/memory-alloc.c +++ b/drivers/md/dm-vdo/memory-alloc.c @@ -20,11 +20,9 @@ */ 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 (pointer != NULL) ? *pointer : false; + return vdo_lookup_thread(&allocating_threads) != NULL; } /*